/etc/init.d/rsyslog is an init script not a link to /lib/init/upstart-job
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
openssh (Ubuntu) |
Won't Fix
|
Undecided
|
Unassigned | ||
rsyslog (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Using Canonical-provided AMI of Ubuntu 14.04, or the LXC Ubuntu 14.04 template, /etc/init.d/rsyslog is an init script. In Ubuntu 10.04 or 12.04, /etc/init.d/rsyslog was a symbolic link to /lib/init/
The problem here is that the init script does this:
. /lib/lsb/
And that file has this function, used later in /etc/init.
init_is_upstart()
{
if [ -x /sbin/initctl ] && /sbin/initctl version 2>/dev/null | /bin/grep -q upstart; then
return 0
fi
return 1
}
Running /etc/init.d/rsyslog with start or restart commands results in a return code of 1 because the case statement for these uses the init_is_upstart function:
if init_is_upstart; then
fi
I modified /etc/init.d/rsyslog on an instance to add "set -x", and here's the results of running /etc/init.d/rsyslog start
ubuntu@
+ PATH=/sbin:
+ DESC=enhanced syslogd
+ NAME=rsyslog
+ RSYSLOGD=rsyslogd
+ DAEMON=
+ PIDFILE=
+ SCRIPTNAME=
+ [ -x /usr/sbin/rsyslogd ]
+ [ -r /etc/default/
+ . /etc/default/
+ RSYSLOGD_OPTIONS=
+ . /lib/lsb/
+ run-parts --lsbsysinit --list /lib/lsb/
+ [ -r /lib/lsb/
+ . /lib/lsb/
+ [ -r /lib/lsb/
+ . /lib/lsb/
+ LOG_DAEMON_MSG=
+ FANCYTTY=
+ [ -e /etc/lsb-
+ true
+ init_is_upstart
+ [ -x /sbin/initctl ]
+ /bin/grep -q upstart
+ /sbin/initctl version
+ return 0
+ exit 1
The fix here is to properly create a symlink of /lib/init/
Status changed to 'Confirmed' because the bug affects multiple users.