Bug#390687: lprng does not start with new initscripts RAMRUN option
Package: lprng
Version: 3.8.28-6
Severity: important
Tags: patch
If the lockfile directory does not exists, lprng fails to start. This
is, eg. the case with the new RAMRUN option in the new initscripts,
where /var/run is kept on a tmpfs and therefore cleared during reboot:
root@positron:~# /etc/init.d/lprng start
Starting LPRNG printer spooler: lpd2006-10-02-16:52:29.236 positron lpd: Cannot open lock file '/var/run/lprng/lpd.515' - No such file or directory
.
The following patch solves this:
diff -urN lprng-3.8.28.orig/debian/init.d lprng-3.8.28/debian/init.d
--- lprng-3.8.28.orig/debian/init.d 2006-10-02 16:48:33.000000000
+0200
+++ lprng-3.8.28/debian/init.d 2006-10-02 16:49:16.000000000 +0200
@@ -47,6 +47,9 @@
if [ -z $LOCKFILE ]
then
LOCKFILE=/var/run/lprng/lpd
+ if [ ! -d /var/run/lprng ]; then
+ mkdir /var/run/lprng
+ fi
fi
PIDFILE=$LOCKFILE.$LPD_PORT
Regards
/Rasmus
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18
Locale: LANG=da_DK.UTF-8, LC_CTYPE=da_DK.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to da_DK.UTF-8)
Versions of packages lprng depends on:
ii debconf [debconf-2.0] 1.5.5 Debian configuration management sy
ii libc6 2.3.6.ds1-4 GNU C Library: Shared libraries
ii libcomerr2 1.39-1.1 common error description library
ii libkrb53 1.4.4-3 MIT Kerberos runtime libraries
ii libssl0.9.8 0.9.8c-2 SSL shared libraries
ii lsb-base 3.1-17 Linux Standard Base 3.1 init scrip
lprng recommends no packages.
-- debconf information:
* lprng/start_lpd: true
lprng/twolpd_perms:
lprng/twolpd_conf:
lprng/setuid_tools: false
diff -urN lprng-3.8.28.orig/debian/init.d lprng-3.8.28/debian/init.d
--- lprng-3.8.28.orig/debian/init.d 2006-10-02 16:48:33.000000000 +0200
+++ lprng-3.8.28/debian/init.d 2006-10-02 16:49:16.000000000 +0200
@@ -47,6 +47,9 @@
if [ -z $LOCKFILE ]
then
LOCKFILE=/var/run/lprng/lpd
+ if [ ! -d /var/run/lprng ]; then
+ mkdir /var/run/lprng
+ fi
fi
PIDFILE=$LOCKFILE.$LPD_PORT
Reply to: