~ubuntu-branches/debian/sid/cryptsetup/sid

« back to all changes in this revision

Viewing changes to debian/cryptdisks.functions

  • Committer: Package Import Robot
  • Author(s): Jonas Meurer
  • Date: 2012-02-05 03:17:59 UTC
  • mfrom: (0.2.9)
  • Revision ID: package-import@ubuntu.com-20120205031759-kua3bplwunj0q2zl
Tags: 2:1.4.1-1
* new upstream release (1.4.0 + 1.4.1) (closes: #647851)
  - fixes typo in german translation. (closes: #645528)
  - remove patches, all incorporated upstream.
  - soname bump, rename library package to libcryptsetup4
* check for busybox in initramfs cryptroot hook, and install the sed binary
  in case it's either not installed or not activated. (closes: #591853)
* add checks for 'type $KEYSCRIPT' to initscripts cryptdisks.functions, and
  to cryptroot initramfs script/hook. this adds support for keyscripts inside
  $PATH. thanks to Ian Jackson for the suggestion. (closes: #597583)
* use argument '--sysinit' for vgchange in cryptroot initramfs script. Thanks
  to Christoph Anton Mitterer for the suggestion.
* add option for discard/trim features to crypttab and initramfs scripts.
  Thanks to intrigeri and Peter Colberg for patches. (closes: #648868)
* print $target on error in initramfs hook. Thanks to Daniel Hahler for the
  bugreport. (closes: #648192)
* add a warning about using decrypt_derived keyscript for devices with
  persistent data. Thanks to Arno Wagner for pointing this out.
* remove quotes from resume device candidates at get_resume_devs() in
  initramfs hook script. Thanks to Johannes Rohr. (closes: #634017)
* support custom $TABFILE, thanks to Douglas Huff. (closes: #638317)
* fix get_lvm_deps() in initramfs cryptroot hook to add all physical volumes
  of lvm volume group that contains the rootfs logical volume, even if the
  rootfs is lv is not spread over all physical volumes. Thanks to Christian
  Pernegger for bugreport and patch. (closes: #634109)
* debian/initramfs/cryptroot-script: Move check for maximum number of tries
  behind the while loop, to make the warning appear in case that maximum
  number of tries is reached. Thanks to Chistian Lamparter for bugreport and
  patch. (closes: #646083)
* incorporate changes to package descriptions and debconf templates that
  suggested by debian-l10n-english people. Special thanks go to Justin B Rye.
* acknowledge NMU, thanks a lot to Christian Perrier for his great work on
  the i18n front. (closes: #633105, #641719, #641839, #641947, #642470,
  #640056, #642540, #643633, #643962, #644853)
* add and update debconf translations:
  - italian, thanks to Milo Casagrande, Francesca Ciceri. (closes: #656933)
  - german, thanks to Erik Pfannenstein. (closes: #642147)
  - spanish, thanks to Camaleón. (closes: #658360)
  - russian, thanks to Yuri Kuzlov (closes: #654676)
* set architecture to linux-any, depends on linux kernel anyway. Thanks to
  Christoph Egger. (closes: #638257)
* small updates to the copyright file.
* add targets build-indep and build-arch to debian/rules, thanks to lintian.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
# and should not be executed directly.
5
5
 
6
6
PATH="/usr/sbin:/usr/bin:/sbin:/bin"
7
 
TABFILE="/etc/crypttab"
 
7
TABFILE=${TABFILE-"/etc/crypttab"}
8
8
CRYPTDISKS_ENABLE="Yes"
9
9
 
10
10
#set -x
11
11
 
12
 
# Sanity checks
 
12
# Sanity check #1
13
13
[ -x /sbin/cryptsetup ] || exit 0
14
 
[ -f "$TABFILE"       ] || exit 0
15
14
 
16
15
. /lib/lsb/init-functions
17
16
 
19
18
        . /etc/default/cryptdisks
20
19
fi
21
20
 
 
21
# Sanity check #2
 
22
[ -f "$TABFILE" ] || exit 0
 
23
 
22
24
MOUNT="$CRYPTDISKS_MOUNT"
23
25
 
24
26
# Parses the option field from the crypttab file
129
131
                                log_warning_msg "$dst: option tries used with an incorrect argument - forced to $TRIES"
130
132
                        fi
131
133
                        ;;
 
134
                discard)
 
135
                        PARAMS="$PARAMS --allow-discards"
 
136
                        ;;
132
137
                swap)
133
138
                        MAKESWAP="yes"
134
139
                        SWCHECK="/lib/cryptsetup/checks/un_blkid"
167
172
                        elif [ -z "$VALUE" ]; then
168
173
                                log_warning_msg "$dst: no value for keyscript option, skipping"
169
174
                                return 1
170
 
                        #elif type "$VALUE" >/dev/null 2>&1; then
171
175
                        elif [ -x "$VALUE" ]; then
172
176
                                KEYSCRIPT="$VALUE"
173
177
                        elif [ -x "/lib/cryptsetup/scripts/$VALUE" ]; then
174
178
                                KEYSCRIPT="/lib/cryptsetup/scripts/$VALUE"
 
179
                        elif type "$VALUE" >/dev/null 2>&1; then
 
180
                                KEYSCRIPT="$VALUE"
175
181
                        else
176
182
                                log_warning_msg "script $VALUE is not an executable script, skipping"
177
183
                                return 1