[Bug 1311810] Re: /etc/init.d/rsyslog is an init script not a link to /lib/init/upstart-job
Colin Watson
cjwatson at canonical.com
Fri May 2 08:32:51 UTC 2014
This change was made intentionally according to a policy change:
https://wiki.ubuntu.com/UpstartCompatibleInitScripts
So I'm not going to change openssh itself, nor I think should rsyslog be
changed. However, I believe some of the Upstart folks were looking into
a quite different centralised solution to the underlying problem you're
encountering; I forget the details but I think it was to have /lib/lsb
/init-functions deal with automatically redirecting manual
/etc/init.d/foo calls to the corresponding Upstart jobs.
(Note, though, that you can and should use the "service" command, which
abstracts away these changes.)
** Changed in: openssh (Ubuntu)
Status: Confirmed => Won't Fix
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to rsyslog in Ubuntu.
https://bugs.launchpad.net/bugs/1311810
Title:
/etc/init.d/rsyslog is an init script not a link to /lib/init/upstart-
job
Status in “openssh” package in Ubuntu:
Won't Fix
Status in “rsyslog” package in Ubuntu:
Confirmed
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/upstart-
job.
The problem here is that the init script does this:
. /lib/lsb/init-functions
And that file has this function, used later in /etc/init.d/rsyslog:
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
exit 1
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 at rsyslog-bug:~$ sudo /etc/init.d/rsyslog start
+ PATH=/sbin:/usr/sbin:/bin:/usr/bin
+ DESC=enhanced syslogd
+ NAME=rsyslog
+ RSYSLOGD=rsyslogd
+ DAEMON=/usr/sbin/rsyslogd
+ PIDFILE=/var/run/rsyslogd.pid
+ SCRIPTNAME=/etc/init.d/rsyslog
+ [ -x /usr/sbin/rsyslogd ]
+ [ -r /etc/default/rsyslog ]
+ . /etc/default/rsyslog
+ RSYSLOGD_OPTIONS=
+ . /lib/lsb/init-functions
+ run-parts --lsbsysinit --list /lib/lsb/init-functions.d
+ [ -r /lib/lsb/init-functions.d/20-left-info-blocks ]
+ . /lib/lsb/init-functions.d/20-left-info-blocks
+ [ -r /lib/lsb/init-functions.d/50-ubuntu-logging ]
+ . /lib/lsb/init-functions.d/50-ubuntu-logging
+ LOG_DAEMON_MSG=
+ FANCYTTY=
+ [ -e /etc/lsb-base-logging.sh ]
+ 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/upstart-job
to /etc/init.d/rsyslog, which will provide the sysv/lsb compatible
interface to manage the upstart job. This should be done in the
package, not by end users who are attempting to control their rsyslog
service.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/1311810/+subscriptions
More information about the foundations-bugs
mailing list