Package: scanlogd
Version: 2.2.5-2.2
Severity: important
Tags: patch

Hi,

setting RAMRUN=yes in /etc/default/rcS makes /var/run available
as ram file system (tmpfs).  However this will prevent the
startup of scanlogd during bootup or by invoke-rc.d.

  $ invoke-rc.d scanlogd start
  Starting scanlogd: chroot: No such file or directory
  invoke-rc.d: initscript scanlogd, action "start" failed.

The reason is, that the directory /var/run/scanlogd is required
during startup.  But on ramdisks it does not exist.  Despite of
other packages (like cups or ssh) with directories in /var/run,
the init script of scanlogd unfortunately doesn't check that.

Also see rcS(5) and the policy (sec. 9.3.2. last paragraph).

The patch below will add this check to the init script.

Best regards,
Mathias

-- System Information:
Debian Release: 6.0.3
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-686 (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages scanlogd depends on:
ii  adduser                       3.112+nmu2 add and remove users and groups
ii  libc6                         2.11.2-10  Embedded GNU C Library: Shared lib

scanlogd recommends no packages.

scanlogd suggests no packages.

-- debconf-show failed
diff -Naur scanlogd-2.2.5/debian/scanlogd.init scanlogd-2.2.5-new/debian/scanlogd.init
--- scanlogd-2.2.5/debian/scanlogd.init	2012-01-02 19:23:48.000000000 +0000
+++ scanlogd-2.2.5-new/debian/scanlogd.init	2012-01-02 19:35:10.000000000 +0000
@@ -24,6 +24,12 @@
 
 set -e
 
+umask 022
+if [ ! -d /var/run/scanlogd ]; then
+    mkdir -p /var/run/scanlogd
+    chmod 0755 /var/run/scanlogd
+fi
+
 case "$1" in
   start)
 	echo -n "Starting $DESC: "

Reply via email to