← Back to team overview

touch-packages team mailing list archive

[Bug 1311810] Re: /etc/init.d/rsyslog is an init script not a link to /lib/init/upstart-job

 

Trying to change my syslog config today this bit me . I couldn't figure
out why my changes weren't working, and since I don't write syslog
filters often I figured I was screwing something up. Turns out they were
fine. "/etc/init.d/rsyslog restart" was just silently doing nothing.
This is terrabad. If it's capable of doing what I ask it to, it should.
At the very very least, it should display a message along the lines of
"This won't work. Do \"service rsyslog restart\" instead.".

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to openssh 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@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