Sunday, May 13, 2012

Missing LSB tags and overrides on Debian Linux

Earlier this afternoon, I issued the commands below to update the Debian operating system.

aptitude update
aptitude safe-upgrade

However, I got a lot of error messages below. I searched the Internet and found a solution.

The following packages will be upgraded:
  acpid at evolution-data-server evolution-data-server-common
  firmware-linux-free gir1.0-json-glib-1.0 libapr1 libbrlapi0.5
  libcamel1.2-14 libebackend1.2-0 libebook1.2-9 libecal1.2-7

  libedata-book1.2-2 libedata-cal1.2-7 libedataserver1.2-13
  libedataserverui1.2-8 libegroupwise1.2-13 libgdata-google1.2-1
  libgdata1.2-1 libjson-glib-1.0-0 libpolkit-agent-1-0
  libpolkit-backend-1-0 libpolkit-gobject-1-0 libxi6 linux-source-2.6.32
  locales openssh-client policykit-1 procps python python-minimal
  python-wicd tzdata tzdata-java wicd-daemon wicd-gtk
The following partially installed packages will be configured:
  initscripts
The following packages are RECOMMENDED but will NOT be installed:
  openssh-blacklist-extra
36 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/78.6 MB of archives. After unpacking 16.4 kB will be freed.
Do you want to continue? [Y/n/?] y
Reading changelogs... Done              
Extracting templates from packages: 100%
Preconfiguring packages ...
Setting up initscripts (2.88dsf-13.1+squeeze1) ...
insserv: warning: script 'K07smfpd' missing LSB tags and overrides
insserv: warning: script 'smfpd' missing LSB tags and overrides

insserv: There is a loop between service rmnologin and mountnfs if started
insserv:  loop involving service mountnfs at depth 6
insserv:  loop involving service nfs-common at depth 5
insserv: There is a loop between service rmnologin and checkroot if started
insserv:  loop involving service checkroot at depth 3
insserv:  loop involving service keyboard-setup at depth 2
insserv:  loop involving service alsa-utils at depth 11
insserv: Starting smfpd depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting smfpd depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting smfpd depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting smfpd depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting smfpd depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting smfpd depends on rmnologin and therefore on system facility `$all' which can not be true!

...

insserv: Starting smfpd depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Max recursions depth 99 reached
insserv:  loop involving service anacron at depth 11
insserv: There is a loop between service rmnologin and mountall if started
insserv:  loop involving service mountall at depth 6
insserv:  loop involving service checkfs at depth 5
insserv:  loop involving service mtab at depth 4
insserv: There is a loop between service rmnologin and checkroot if started
insserv:  loop involving service hostname at depth 4
insserv: There is a loop between service rmnologin and ifupdown if started
insserv:  loop involving service ifupdown at depth 7
insserv:  loop involving service ifupdown-clean at depth 6
insserv:  loop involving service module-init-tools at depth 6
insserv: There is a loop at service smfpd if started
insserv:  loop involving service networking at depth 9
insserv:  loop involving service mountnfs-bootclean at depth 13
insserv: There is a loop between service smfpd and ifupdown-clean if started
insserv:  loop involving service smfpd at depth 1
insserv: There is a loop between service rmnologin and mountall-bootclean if started
insserv:  loop involving service mountall-bootclean at depth 1
insserv: exiting now without changing boot order!
update-rc.d: error: insserv rejected the script header
dpkg: error processing initscripts (--configure):
 subprocess installed post-installation script returned error exit status 1
configured to not write apport reports
                                      Errors were encountered while processing:
 initscripts
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:
Setting up initscripts (2.88dsf-13.1+squeeze1) ...
insserv: warning: script 'K07smfpd' missing LSB tags and overrides
insserv: warning: script 'smfpd' missing LSB tags and overrides
insserv: There is a loop between service rmnologin and mountnfs if started
insserv:  loop involving service mountnfs at depth 6
insserv:  loop involving service nfs-common at depth 5
insserv: There is a loop between service rmnologin and checkroot if started
insserv:  loop involving service checkroot at depth 3
insserv:  loop involving service keyboard-setup at depth 2
insserv:  loop involving service alsa-utils at depth 11
insserv: Starting smfpd depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting smfpd depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting smfpd depends on rmnologin and therefore on system facility `$all' which can not be true!


...


insserv: Starting smfpd depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Max recursions depth 99 reached
insserv:  loop involving service anacron at depth 11
insserv: There is a loop between service rmnologin and mountall if started
insserv:  loop involving service mountall at depth 6
insserv:  loop involving service checkfs at depth 5
insserv:  loop involving service mtab at depth 4
insserv: There is a loop between service rmnologin and checkroot if started
insserv:  loop involving service hostname at depth 4
insserv: There is a loop between service rmnologin and ifupdown if started
insserv:  loop involving service ifupdown at depth 7
insserv:  loop involving service ifupdown-clean at depth 6
insserv:  loop involving service module-init-tools at depth 6
insserv: There is a loop at service smfpd if started
insserv:  loop involving service networking at depth 9
insserv:  loop involving service mountnfs-bootclean at depth 13
insserv: There is a loop between service smfpd and ifupdown-clean if started
insserv:  loop involving service smfpd at depth 1
insserv: There is a loop between service rmnologin and mountall-bootclean if started
insserv:  loop involving service mountall-bootclean at depth 1
insserv: exiting now without changing boot order!
update-rc.d: error: insserv rejected the script header
dpkg: error processing initscripts (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 initscripts
             

A solution is here:

I typed the command:

gedit /etc/init.d/smfpd

Then, I inserted the lines in bold and in this blue colour. I saved the file.


#!/bin/sh

### BEGIN INIT INFO
# Provides:          smfpd
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# X-Start-Before:    kdm gdm xdm hal
# X-Stop-After:      kdm gdm xdm hal
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description:
# Description:      
#                   
### END INIT INFO



# smfpd is a parallel port handling daemon. It needs root privileges
# to use iopl(2), inb(2) and outb(2) system calls.
#
# smfpd uses inet domain socket, this script should be run
# after network initialization.
#
# This script is a part of Unified Linux Driver package.
# If your MFP device is not connected to LPT port, you can safely
# disable execution of this script - uncomment 'exit 0' at the next line.
# exit 0

SMFPD=/usr/sbin/smfpd
test -x $SMFPD || exit 5

PATH=/usr/sbin:/sbin:/usr/bin:/bin
SMFPD=smfpd

PROCESS_PID=`ps ax | grep "[0-9]:[0-9][0-9] $SMFPD" | awk '{print $1}'`

case "$1" in
    check)
        if test -z "$PROCESS_PID"; then
            echo "Process is not running"
        else
            echo "Process $SMFPD[$PROCESS_PID] is running"
        fi
    ;;
    start)
        if test -z "$PROCESS_PID"; then
            echo -n "Starting smfpd daemon ... "
            $SMFPD
            echo "done"
            $0 check
        else
            echo "Process $SMFPD[$PROCESS_PID] is already running"
        fi
    ;;
    stop)
        if test -n "$PROCESS_PID"; then
            echo -n "Stopping smfpd daemon ... "
            kill -TERM $PROCESS_PID
            echo "done"
        else
            echo "Process is not running"
        fi
    ;;
    restart)
        $0 stop
        sleep 1
        $0 start
    ;;
    *)
        echo "Usage: $0 {check|start|stop|restart}"
        exit 1
    ;;
esac

exit 0


After that, I issued the commands again:

aptitude update
aptitude safe-upgrade

The update was fine.



References

The solution was inspired by this page and this page.


1 comment:

Unknown said...

It worked perfectly for me! Thank you