~ubuntu-branches/ubuntu/maverick/cryptsetup/maverick-proposed

« back to all changes in this revision

Viewing changes to debian/scripts/cryptdisks_start

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-11-11 15:04:27 UTC
  • mfrom: (0.1.7 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091111150427-elb822l63lnihaue
Tags: 2:1.1.0~rc2-1ubuntu1
* Merge with Debian testing. Remaining Ubuntu changes:
  - debian/rules: cryptsetup is linked dynamically against libgcrypt and
    libgpg-error.
  - Upstart migration:
    + Add debian/cryptdisks-enable.upstart.
    + debian/cryptdisks{,-early}.init: Make the 'start' action of the init
      script a no-op, this should be handled entirely by the upstart job.
      (LP #473615)
    + debian/cryptsetup.postinst: Remove any symlinks from /etc/rcS.d on
      upgrade. 
    + debian/rules: Do not install start symlinks for those two, and install
      debian/cryptdisks-enable.upstart scripts.
  - Add debian/cryptsetup.apport: Apport package hook. Install in
    debian/rules, and create dir in debian/cryptsetup.dirs.
  - Start usplash in initramfs, since we need it for fancy passphrase input:
    + debian/initramfs/cryptroot-conf, debian/initramfs-conf.d: USPLASH=y
    + debian/control: Bump initramfs-tools Suggests to Depends:.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
log_action_begin_msg "Starting crypto disk"
28
28
mount_fs
29
29
 
30
 
found="no"
 
30
count=0
 
31
tablen="$(egrep -v "^[[:space:]]*(#|$)" "$TABFILE" | /usr/bin/wc -l)"
31
32
egrep -v "^[[:space:]]*(#|$)" "$TABFILE" | while read dst src key opts; do
 
33
        count=$(( $count + 1 ))
32
34
        if [ "$1" = "$dst" ]; then
33
 
                found="yes"
34
 
                handle_crypttab_line_start "$dst" "$src" "$key" "$opts" <&3
35
 
                exit 0
 
35
                ret=0
 
36
                handle_crypttab_line_start "$dst" "$src" "$key" "$opts" <&3 || ret=$?
 
37
        elif [ $count -ge $tablen ]; then
 
38
                ret=1
 
39
                device_msg "$1" "failed, not found in crypttab"
 
40
        else
 
41
                continue
36
42
        fi
 
43
        umount_fs
 
44
        log_action_end_msg $ret
 
45
        exit $ret
37
46
done 3<&1
38
 
 
39
 
if [ "$found" = "no" ]; then
40
 
        device_msg "$1" "failed, not found in crypttab"
41
 
fi
42
 
 
43
 
umount_fs
44
 
log_action_end_msg 0