[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#387176: modprobe incorrectly used in init script



Package: cupsys
Version: 1.2.2-2+b1
Severity: normal
Tags: patch

The last version of the cupsys init script assumes that:
- we are using a kernel with modules compiled
- modutils/module-init-tools are installed
- we want to load lp and ppdev if they are not statically compiled in
  the kernel

This is an issue for example when only ipp printers are used (so we 
don't need any of these drivers), and the running kernel does not 
support lkms (or modprobe is not available).

While I think 'lp' and 'ppdev' should be added to /etc/modules if
required, and that loading lkms in init script is not really the right
thing to do, we should at least check if lkms are available before
calling modprobe.
Maybe we should also check that modprobe is available (and executable?).

--- cupsys.orig 2006-09-12 12:56:48.000000000 +0200
+++ cupsys      2006-09-12 12:57:25.000000000 +0200
@@ -31,7 +31,8 @@ case "$1" in
        chmod 3775 /usr/share/cups/model 2>/dev/null || true
        mkdir -p `dirname "$PIDFILE"`
        if [ "$LOAD_LP_MODULE" = "yes" -a -f /usr/lib/cups/backend/parallel \
-             -a -f /proc/devices -a -z "$(grep -e ' lp$' /proc/devices 2>/dev/$
+             -a -f /proc/devices -a -f /proc/modules -a -f /sbin/modprobe \
+             -a -z "$(grep -e ' lp$' /proc/devices 2>/dev/null)" ]; then
          modprobe -q lp || true
          modprobe -q ppdev || true
        fi

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16.1
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)

Versions of packages cupsys depends on:
ii  adduser                  3.97            Add and remove users and groups
ii  cupsys-common            1.2.2-2         Common UNIX Printing System(tm) - 
ii  debconf [debconf-2.0]    1.5.4           Debian configuration management sy
ii  gs-esp                   8.15.2.dfsg.1-2 The Ghostscript PostScript interpr
ii  libc6                    2.3.6.ds1-4     GNU C Library: Shared libraries
ii  libcupsimage2            1.2.2-2+b1      Common UNIX Printing System(tm) - 
ii  libcupsys2               1.2.2-2+b1      Common UNIX Printing System(tm) - 
ii  libdbus-1-3              0.92-2          simple interprocess messaging syst
ii  libgnutls13              1.4.3-2         the GNU TLS library - runtime libr
ii  libldap2                 2.1.30-13+b1    OpenLDAP libraries
ii  libpam0g                 0.79-3.2        Pluggable Authentication Modules l
ii  libpaper1                1.1.20          Library for handling paper charact
ii  libslp1                  1.2.1-5         OpenSLP libraries
ii  lsb-base                 3.1-15          Linux Standard Base 3.1 init scrip
ii  patch                    2.5.9-4         Apply a diff file to an original
ii  perl-modules             5.8.8-6.1       Core Perl modules
ii  procps                   1:3.2.7-2       /proc file system utilities
ii  xpdf-utils [poppler-util 3.01-9          Portable Document Format (PDF) sui
ii  zlib1g                   1:1.2.3-13      compression library - runtime

Versions of packages cupsys recommends:
ii  cupsys-client           1.2.2-2+b1       Common UNIX Printing System(tm) - 
ii  foomatic-filters        3.0.2-20060712-3 linuxprinting.org printer support 
ii  smbclient               3.0.23c-1        a LanManager-like simple client fo

-- debconf information:
  cupsys/raw-print: true
* cupsys/browse: true
* cupsys/ports: 631
  cupsys/backend: ipp, lpd, parallel, socket, usb
  cupsys/portserror:




Reply to: