~siretart/cryptsetup/debian

« back to all changes in this revision

Viewing changes to debian/cryptdisks.functions

  • Committer: Reinhard Tartler
  • Date: 2008-08-06 13:16:09 UTC
  • Revision ID: siretart@tauware.de-20080806131609-ynuo5fib2ndpkmg5
import cryptsetup_1.0.6-5.dsc

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
        opts=$(echo -n $1 | sed 's/ *#.*//')
37
37
        LOUD=""
38
38
        PARAMS=""
39
 
        SIZE=""
40
39
        CHECK=""
41
40
        CHECKARGS=""
42
41
        PRECHECK=""
67
66
                        PARAMS="$PARAMS -c $VALUE"
68
67
                        ;;
69
68
                size)
70
 
                        if echo "$VALUE" | grep -q "^[[:digit:]]\+$" && [ "$VALUE" -gt 0 ]; then
71
 
                                SIZE="$VALUE"
 
69
                        if [ -z "$VALUE" ] || echo "$VALUE" | grep -q "^[[:digit:]]\+$" && [ "$VALUE" -gt 0 ]; then
 
70
                                PARAMS="$PARAMS -s $VALUE"
72
71
                        else
73
 
                                log_warning_msg "$dst: option size used with an incorrect argument - forced to $SIZE"
 
72
                                log_warning_msg "$dst: option size used with an incorrect argument, skipping"
 
73
                                return 1
74
74
                        fi
75
 
                        PARAMS="$PARAMS -s $SIZE"
76
75
                        ;;
77
76
                hash)
78
77
                        if [ -z "$VALUE" ]; then
355
354
                return 1
356
355
        fi
357
356
 
358
 
        PARAMS="$PARAMS --key-file=$key"
359
 
 
360
357
        if [ -n "$KEYSCRIPT" ]; then
361
358
                # keyscript => "key" is just an argument to the keyscript
362
359
                keyscriptarg="$key"