~siretart/cryptsetup/debian

« back to all changes in this revision

Viewing changes to debian/scripts/cryptdisks_start

  • Committer: Reinhard Tartler
  • Date: 2008-05-25 20:03:28 UTC
  • Revision ID: siretart@tauware.de-20080525200328-szhw0j5yw0p5kl33
import cryptsetup_1.0.6~pre1+svn45-1.dsc

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/sh
2
2
 
3
 
# cryptdisk_start - wrapper around cryptsetup which parses
 
3
# cryptdisks_start - wrapper around cryptsetup which parses
4
4
# /etc/crypttab, just like mount parses /etc/fstab.
5
5
 
6
6
# Initial code and (c) 2007 Jon Dowland <jon@alcopop.org>
10
10
set -e
11
11
 
12
12
if [ $# -lt 1 ]; then
13
 
        echo "usage: $0 crypt_name <name>" >&2
 
13
        echo "usage: $0 <name>" >&2
14
14
        echo >&2
15
15
        echo "reads /etc/crypttab and starts the mapping corresponding to <name>" >&2
16
16
        exit 1
23
23
fi
24
24
 
25
25
egrep -v "^[[:space:]]*(#|$)" "$TABFILE" | while read dst src key opts; do
26
 
        if [ "$1" == "$dst" ]; then
27
 
                handle_crypttab_line "$dst" "$src" "$key" "$opts"
 
26
        if [ "$1" = "$dst" ]; then
 
27
                handle_crypttab_line_start "$dst" "$src" "$key" "$opts"
28
28
                exit 0
29
29
        fi
30
30
done