[Bug 792912] Re: rc.local needs small fix

Steve Langasek steve.langasek at canonical.com
Thu Sep 29 20:50:45 UTC 2011


Upstart does not "mess" with /etc/rc.local either.
 - a template file is created by initscripts on initial installation.  This template is a no-op.
 - set -e is used because, consistent with Debian/Ubuntu policy, errors should not be silently ignored from shell scripts.
 - anything the script does after install is the responsibility of the user.  Remove the -e if you like.
 - if you have any commands in your rc.local *other* than 'exit 0', they didn't come from Ubuntu.

** Changed in: upstart (Ubuntu)
       Status: New => Invalid

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to upstart in Ubuntu.
https://bugs.launchpad.net/bugs/792912

Title:
  rc.local needs small fix

Status in “upstart” package in Ubuntu:
  Invalid

Bug description:
  Binary package hint: upstart

  Hi,

  this is probably not directly an upstart issue but no way for me to
  tell where this file belongs.

  short description:
  rc.local points out that it MUST exit with rc0 .Just that someone has set it to run using sh -e, so that it will break on any error. 
  That means it doesn't work as the author intended.

  You might be able to get what you want by a more complex script that
  'traps' and handles the return codes, so that it will still break like
  set -e once a command hit an error but instead of breaking immediately
  jump to a function that does the exit 0.

  
  (I don't see why the set -e is in place anyway, imho rc.local is used for site modifications of  the startup process, and as such, fully user controlled. Mostly it'll be in use because something else in the distro is not working... 
  so it's not really "nice" to influence how it works per default. 
  Did that come from debian? 
  List of OS that do not mess with in rc.local: iirc ALL other versions of unix/linux/bsd. :)

  ProblemType: Bug
  DistroRelease: Ubuntu 11.04
  Package: upstart 0.9.7-1
  ProcVersionSignature: Ubuntu 2.6.38-8.42-generic 2.6.38.2
  Uname: Linux 2.6.38-8-generic x86_64
  NonfreeKernelModules: zfs zcommon znvpair zavl zunicode fglrx
  Architecture: amd64
  Date: Sat Jun  4 22:26:06 2011
  ProcEnviron:
   LANGUAGE=en_US:en
   LANG=en_US.UTF-8
   SHELL=/bin/sh
  SourcePackage: upstart
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/upstart/+bug/792912/+subscriptions




More information about the foundations-bugs mailing list