Package: iscsitarget Version: 1.4.20.1-3 Severity: normal Tags: patch /etc/init.d/iscsitarget stop first shuts down ietd, then unloads the module.
Unloading the module fails because the module is still in use for some reason. Sleeping briefly after quitting the daemon allows to reliably unload the module. See also the attached patch. ~David -- System Information: Debian Release: squeeze/sid APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 2.6.34 (SMP w/8 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages iscsitarget depends on: ii libc6 2.11.2-2 Embedded GNU C Library: Shared lib ii lsb-base 3.2-23.1 Linux Standard Base 3.2 init scrip ii procps 1:3.2.8-9 /proc file system utilities Versions of packages iscsitarget recommends: ii iscsitarg 1.4.20.1-3+2.6.34-10.00.Custom iSCSI Enterprise Target module for Versions of packages iscsitarget suggests: ii iscsitarget-source 1.4.20.1-3 iSCSI Enterprise Target kernel mod -- Configuration Files: /etc/default/iscsitarget changed [not included] /etc/iet/ietd.conf [Errno 13] Permission denied: u'/etc/iet/ietd.conf' /etc/init.d/iscsitarget changed [not included] -- no debconf information
--- iscsitarget.orig 2010-07-20 15:42:31.000000000 +0200 +++ iscsitarget 2010-07-20 15:45:32.000000000 +0200 @@ -84,6 +84,9 @@ fi # ugly, but pid file is not removed by ietd rm -f $PID_FILE + + # give ietd time to shut down, otherwise the module won't unload + sleep 1 # check if the module is loaded at all lsmod | grep -q iscsi_trgt