[Pkg-cryptsetup-devel] Bug#390354: Fails in removed state

Goswin Brederlow brederlo at informatik.uni-tuebingen.de
Sat Sep 30 17:18:57 UTC 2006


Package: cryptsetup
Version: 2:1.0.4~rc2-1
Severity: normal
File: /etc/init.d/cryptdisks

Hi there are a few errors in your init.d scripts resulting in a
failure when cryptsetup is removed but not purged:

% /etc/init.d/cryptdisks start
/etc/init.d/cryptdisks: line 31: do_start: command not found


You should use "set -e" so the script exits on errors. But [ ... ] &&
... will result in an error when the test fails. Never use that
outside an if or while. With set -e the script will stop there.

Now for the real error. When cryptsetup is removed then
/lib/cryptsetup/cryptdisks.functions does not exist and is not
parsed. Consequently do_start and do_stop functions are not defined.


You should use the following:

#!/bin/sh
set -e
...
if [ -r /etc/default/cryptdisks ]; then
  . /etc/default/cryptdisks
fi

if [ -r /lib/cryptsetup/cryptdisks.functions ]; then
  . /lib/cryptsetup/cryptdisks.functions
else
  exit 0
fi
...


MfG
	Goswin

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.8-frosties-2
Locale: LANG=C, LC_CTYPE=de_DE (charmap=ISO-8859-1)

Versions of packages cryptsetup depends on:
ii  dmsetup                      2:1.02.07-1 The Linux Kernel Device Mapper use
ii  libc6                        2.3.6.ds1-4 GNU C Library: Shared libraries
ii  libdevmapper1.02             2:1.02.07-1 The Linux Kernel Device Mapper use
ii  libgcrypt11                  1.2.2-3     LGPL Crypto library - runtime libr
ii  libgpg-error0                1.2-1       library for common error values an
ii  libpopt0                     1.10-2      lib for parsing cmdline parameters
ii  libuuid1                     1.39-1      universally unique id library

cryptsetup recommends no packages.




More information about the Pkg-cryptsetup-devel mailing list