[Bug 882254] Re: /etc/rc.local is not executed at startup

julien 882254 at bugs.launchpad.net
Wed Nov 16 10:24:31 UTC 2011


Hello, 
I am quite a newbie in fixing bugs in Ubuntu, but as I deeply needed this feature I had to put my fingers in the mud...
So here is the new file /etc/init.d/rc.local I modified and it works, at least for what I meant to do (in fact the -x didn't worked so I put -e and I forced the execution of /etc/rc.local by adding sh in front ).

#! /bin/sh
### BEGIN INIT INFO
# Provides:          rc.local
# Required-Start:    $remote_fs $syslog $all
# Required-Stop:
# Default-Start:     2 3 4 5
# Default-Stop:
# Short-Description: Run /etc/rc.local if it exist
### END INIT INFO


PATH=/sbin:/usr/sbin:/bin:/usr/bin

. /lib/init/vars.sh
. /lib/lsb/init-functions

do_start() {


	if [ -e /etc/rc.local ]; then

	        [ "$VERBOSE" != no ] && log_begin_msg "Running local boot scripts (/etc/rc.local)"
		sh /etc/rc.local

		ES=$?
		[ "$VERBOSE" != no ] && log_end_msg $ES
		return $ES

	fi
}

case "$1" in
    start)
	do_start
        ;;
    restart|reload|force-reload)
        echo "Error: argument '$1' not supported" >&2
        exit 3
        ;;
    stop)
        ;;
    *)
        echo "Usage: $0 start|stop" >&2
        exit 3
        ;;
esac

hope it will help someone...

-- 
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/882254

Title:
  /etc/rc.local is not executed at startup

Status in “upstart” package in Ubuntu:
  Confirmed

Bug description:
  /etc/rc.local is not executed at startup in 11.10. In 11.04 this was
  not the case. Is there any alternative?

  Greetz,
  Florian

  ProblemType: Bug
  DistroRelease: Ubuntu 11.10
  Package: upstart 1.3-0ubuntu10
  ProcVersionSignature: Ubuntu 3.0.0-12.20-generic 3.0.4
  Uname: Linux 3.0.0-12-generic x86_64
  ApportVersion: 1.23-0ubuntu3
  Architecture: amd64
  Date: Wed Oct 26 22:15:00 2011
  ProcEnviron:
   LANGUAGE=
   PATH=(custom, no user)
   LANG=de_DE.UTF-8
   SHELL=/bin/bash
  SourcePackage: upstart
  UpgradeStatus: Upgraded to oneiric on 2011-10-24 (2 days ago)

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




More information about the foundations-bugs mailing list