Package: lprng
Version: 3.8.B-2.1
Severity: important

Dear Maintainer,

I used aptitude to upgrade packages and it somehow converted sysv init to
systemd init.  Most updated packages installed OK except lprng failed to
configure.  I tried installing it on another drive (that has some unknown
corruption on it that wiil not allow some packages to configure) and that
uses sysv init.  It installed OK and thus I suspect that systemd has
something to do with this failure.  

In the /etc/init.d/lprng scripts I put -x at the end of the 1st line 
(for debugging) and ran them with the "start" variable.  The results were
good on the sysvinit drive but bad on the systemd drive.  Both results are
shown below:

For the good script using sysvinit:
+ PATH=/sbin:/usr/sbin:/bin:/usr/bin
+ DESC=LPRng printer spooler
+ NAME=lprng
+ DAEMON=/usr/sbin/lpd
+ CONFIGDIR=/etc/lprng
+ PRINTCAP=/etc/printcap
+ LPDPRINTCAP=/etc/lprng/printcap
+ SCRIPTNAME=/etc/init.d/lprng
+ test -f /etc/printcap
+ test -f /usr/sbin/lpd
+ sed /^[[:space:]]*lpd_port/!d; s/.*[=#]\(.*\)/\1/; q /etc/lprng/lpd.conf
+ LPD_PORT=
+ [ -z ]
+ LPD_PORT=515
+ sed /^[[:space:]]*lockfile/!d; s/.*[=#]\(.*\)/\1/; q /etc/lprng/lpd.conf
+ LOCKFILE=
+ [ -z ]
+ LOCKFILE=/var/run/lprng/lpd
+ PIDFILE=/var/run/lprng/lpd.515
+ . /lib/init/vars.sh
+ TMPTIME=0
+ SULOGIN=no
+ DELAYLOGIN=no
+ UTC=yes
+ VERBOSE=no
+ FSCKFIX=no
+ [ -f /etc/default/rcS ]
+ . /etc/default/rcS
+ unset EDITMOTD
+ unset RAMRUN
+ unset RAMLOCK
+ [ -r /proc/cmdline ]
+ cat /proc/cmdline
+ [  ]
+ . /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/40-systemd ]
+ true
+ FANCYTTY=
+ [ -e /etc/lsb-base-logging.sh ]
+ true
+ [ -r /etc/default/lprng ]
+ . /etc/default/lprng
+ START_LPD=yes
+ [ yes != yes ]
+ [ no != no ]
+ initialise
+ dirname /var/run/lprng/lpd.515
+ RUNDIR=/var/run/lprng
+ [ ! -d /var/run/lprng ]
+ checkpc -f
+ start-stop-daemon --start --quiet --pidfile /var/run/lprng/lpd.515 --exec 
/usr/sbin/lpd
+ [ no != no ]
+ exit 1

For the bad case usuing ststemd:
+ PATH=/sbin:/usr/sbin:/bin:/usr/bin
+ DESC='LPRng printer spooler'
+ NAME=lprng
+ DAEMON=/usr/sbin/lpd
+ CONFIGDIR=/etc/lprng
+ PRINTCAP=/etc/printcap
+ LPDPRINTCAP=/etc/lprng/printcap
+ SCRIPTNAME=/etc/init.d/lprng
+ test -f /etc/printcap
+ test -f /usr/sbin/lpd
++ sed '/^[[:space:]]*lpd_port/!d; s/.*[=#]\(.*\)/\1/; q' /etc/lprng/lpd.conf
+ LPD_PORT=
+ '[' -z ']'
+ LPD_PORT=515
++ sed '/^[[:space:]]*lockfile/!d; s/.*[=#]\(.*\)/\1/; q' /etc/lprng/lpd.conf
+ LOCKFILE=
+ '[' -z ']'
+ LOCKFILE=/var/run/lprng/lpd
+ PIDFILE=/var/run/lprng/lpd.515
+ . /lib/init/vars.sh
++ TMPTIME=0
++ SULOGIN=no
++ DELAYLOGIN=no
++ UTC=yes
++ VERBOSE=no
++ FSCKFIX=no
++ '[' -f /etc/default/rcS ']'
++ . /etc/default/rcS
++ unset EDITMOTD
++ unset RAMRUN
++ unset RAMLOCK
++ '[' -r /proc/cmdline ']'
+++ cat /proc/cmdline
++ for ARG in $(cat /proc/cmdline)
++ case $ARG in
++ for ARG in $(cat /proc/cmdline)
++ case $ARG in
++ for ARG in $(cat /proc/cmdline)
++ case $ARG in
++ for ARG in $(cat /proc/cmdline)
++ case $ARG in
++ for ARG in $(cat /proc/cmdline)
++ case $ARG in
++ for ARG in $(cat /proc/cmdline)
++ case $ARG in
++ '[' '' ']'
+ . /lib/lsb/init-functions
+++ run-parts --lsbsysinit --list /lib/lsb/init-functions.d
++ for hook in $(run-parts --lsbsysinit --list /lib/lsb/init-functions.d 
2>/dev/null)
++ '[' -r /lib/lsb/init-functions.d/20-left-info-blocks ']'
++ . /lib/lsb/init-functions.d/20-left-info-blocks
++ for hook in $(run-parts --lsbsysinit --list /lib/lsb/init-functions.d 
2>/dev/null)
++ '[' -r /lib/lsb/init-functions.d/40-systemd ']'
++ . /lib/lsb/init-functions.d/40-systemd
+++ _use_systemctl=0
+++ '[' -d /run/systemd/system ']'
+++ prog=lprng
+++ service=lprng.service
++++ systemctl -p LoadState --value show lprng.service
+++ state=loaded
+++ '[' loaded = masked ']'
+++ '[' 1135 -ne 1 ']'
+++ '[' -z '' ']'
+++ case $(readlink -f "$0") in
++++ readlink -f ./lprng
+++ '[' loaded '!=' not-found ']'
+++ _use_systemctl=1
++++ systemctl -p CanReload --value show lprng.service
+++ '[' no = no ']'
+++ '[' start = reload ']'
+++ '[' 1 = 1 ']'
+++ set +e
+++ set +u
+++ '[' xstart = xstart -o xstart = xstop -o xstart = xrestart -o xstart = 
xreload -o xstart = xforce-reload -o xstart = xtry-restart -o xstart = xstatus 
']'
+++ systemctl_redirect ./lprng start
+++ local s
+++ local rc
+++ local prog=lprng
+++ local command=start
+++ case "$command" in
+++ s='Starting lprng (via systemctl)'
+++ service=lprng.service
++++ systemctl is-system-running
+++ OUT=degraded
+++ '[' degraded '!=' degraded ']'
+++ '[' start = status ']'
+++ log_daemon_msg 'Starting lprng (via systemctl)' lprng.service
+++ '[' -z 'Starting lprng (via systemctl)' ']'
+++ log_daemon_msg_pre 'Starting lprng (via systemctl)' lprng.service
+++ log_use_fancy_output
+++ TPUT=/usr/bin/tput
+++ EXPR=/usr/bin/expr
+++ '[' -t 1 ']'
+++ FANCYTTY=0
+++ case "$FANCYTTY" in
+++ false
+++ '[' -z lprng.service ']'
+++ echo -n 'Starting lprng (via systemctl): lprng.service'
Starting lprng (via systemctl): lprng.service+++ log_daemon_msg_post 'Starting 
lprng (via systemctl)' lprng.service
+++ :
+++ /bin/systemctl --no-pager start lprng.service
Warning: The unit file, source configuration file or drop-ins of lprng.service 
changed on disk. Run 'systemctl daemon-reload' to reload units.
Job for lprng.service failed because the control process exited with error code.
See "systemctl status lprng.service" and "journalctl -xe" for details.
+++ rc=1
+++ '[' start = status ']'
+++ log_end_msg 1
+++ '[' -z 1 ']'
+++ local retval
+++ retval=1
+++ log_end_msg_pre 1
+++ log_use_fancy_output
+++ TPUT=/usr/bin/tput
+++ EXPR=/usr/bin/expr
+++ '[' -t 1 ']'
+++ FANCYTTY=0
+++ case "$FANCYTTY" in
+++ false
+++ log_use_fancy_output
+++ TPUT=/usr/bin/tput
+++ EXPR=/usr/bin/expr
+++ '[' -t 1 ']'
+++ FANCYTTY=0
+++ case "$FANCYTTY" in
+++ false
+++ RED=
+++ YELLOW=
+++ NORMAL=
+++ '[' 1 -eq 0 ']'
+++ '[' 1 -eq 255 ']'
+++ /bin/echo -e ' failed!'
 failed!
+++ log_end_msg_post 1
+++ :
+++ return 1
+++ return 1
+++ exit 1


-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 4.14.0-3-686-pae (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to en_US.UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set 
to en_US.UTF-8)
Shell: /bin/sh linked to /bin/bash
Init: systemd (via /run/systemd/system)

Versions of packages lprng depends on:
ii  debconf [debconf-2.0]  1.5.69
ii  libc6                  2.27-5
ii  libcomerr2             1.44.4-2
ii  libk5crypto3           1.16-2
ii  libkrb5-3              1.16-2
ii  libssl1.1              1.1.0h-4
ii  lsb-base               9.20170808

lprng recommends no packages.

Versions of packages lprng suggests:
ii  lprng-doc    3.8.A~rc2-3.1
pn  magicfilter  <none>

-- Configuration Files:
/etc/init.d/lprng changed:
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="LPRng printer spooler"
NAME=lprng
DAEMON=/usr/sbin/lpd
CONFIGDIR=/etc/lprng
PRINTCAP=/etc/printcap
LPDPRINTCAP=/etc/lprng/printcap
SCRIPTNAME=/etc/init.d/$NAME
test -f $PRINTCAP || test -f $LPDPRINTCAP || exit 0
test -f $DAEMON || test -d /usr/lib/i386-linux-gnu/lprng || exit 5
LPD_PORT=$(sed '/^[[:space:]]*lpd_port/!d; s/.*[=#]\(.*\)/\1/; q' 
$CONFIGDIR/lpd.conf)
if [ -z $LPD_PORT ]
then
  LPD_PORT=515
fi
LOCKFILE=$(sed '/^[[:space:]]*lockfile/!d; s/.*[=#]\(.*\)/\1/; q' 
$CONFIGDIR/lpd.conf)
if [ -z $LOCKFILE ]
then
  LOCKFILE=/var/run/lprng/lpd
fi
PIDFILE=$LOCKFILE.$LPD_PORT
. /lib/init/vars.sh
. /lib/lsb/init-functions
if [ -r /etc/default/lprng ]; then
        . /etc/default/lprng
fi
initialise()
{
  RUNDIR=$(dirname ${PIDFILE})
  [ ! -d ${RUNDIR} ] && mkdir -p ${RUNDIR}
  checkpc -f > /dev/null || true
}
cleanup()
{
  rm -f "${PIDFILE}"
  for dir in $(find /var/spool/lpd/* -type d -print)
  do
    rm -f ${dir}/lock.pr
    rm -f ${dir}/control.pr
    rm -f ${dir}/unspooler.pr
  done
}
case "$1" in
  start)
        if [ "$START_LPD" != "yes" ]; then
    [ "$VERBOSE" != no ] && log_warning_msg "Not starting LPRng - edit 
/etc/default/lprng and change START_LPD to be yes."
                exit 0
    fi
        [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" lpd
        initialise
        if start-stop-daemon --start --quiet --pidfile "${PIDFILE}" \
                --exec $DAEMON ; then
                [ "$VERBOSE" != no ] && log_end_msg 0
        else
                [ "$VERBOSE" != no ] && log_end_msg 1
                exit 1
        fi
        ;;
  stop)
        [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" lpd
        if start-stop-daemon --stop --oknodo --quiet --pidfile "${PIDFILE}" ; 
then
                cleanup
                [ "$VERBOSE" != no ] && log_end_msg 0
        else
                [ "$VERBOSE" != no ] && log_end_msg 1
                exit 1
        fi
        ;;
  status)
        status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
        ;;
  reload)
         [ "$VERBOSE" != no ] && log_daemon_msg "Reloading $DESC configuration 
files..."
         if start-stop-daemon --stop --signal 1 --quiet --pidfile \
                "${PIDFILE}" --oknodo ; then
                [ "$VERBOSE" != no ] && log_end_msg 0
        else
                [ "$VERBOSE" != no ] && log_end_msg 1
                exit 1
        fi
        ;;
  restart|force-reload)
        [ "$VERBOSE" != no ] && log_daemon_msg "Restarting $DESC" lpd
        start-stop-daemon --stop --quiet --pidfile "${PIDFILE}" 
        sleep 1
        initialise
        start-stop-daemon --start --quiet --pidfile "${PIDFILE}" \
            --exec $DAEMON
        [ "$VERBOSE" != no ] && log_end_msg 0
        ;;
  *)
        echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
        exit 1
        ;;
esac
:


-- debconf information:
  lprng/twolpd_conf:
* lprng/setuid_tools: false
* lprng/start_lpd: true
  lprng/twolpd_perms:

Reply via email to