@@ -89,7 +89,7 @@ udevd_modprobe sysinit
89
activate_vgs
89
activate_vgs
90
90
91
# Set up non-root encrypted partition mappings
91
# Set up non-root encrypted partition mappings
92
- if [[ -f /etc/crypttab && $CS ]] && grep -q ^[^ # ] /etc/crypttab ; then
92
+ if [[ -f /etc/crypttab ]] && type -p cryptsetup > /dev/null ; then
93
stat_busy " Unlocking encrypted volumes:"
93
stat_busy " Unlocking encrypted volumes:"
94
modprobe -q dm-crypt 2> /dev/null
94
modprobe -q dm-crypt 2> /dev/null
95
do_unlock () {
95
do_unlock () {
@@ -102,7 +102,7 @@ if [[ -f /etc/crypttab && $CS ]] && grep -q ^[^#] /etc/crypttab; then
102
# Ordering of options is different if you are using LUKS vs. not.
102
# Ordering of options is different if you are using LUKS vs. not.
103
# Use ugly swizzling to deal with it.
103
# Use ugly swizzling to deal with it.
104
# isLuks only gives an exit code but no output to stdout or stderr.
104
# isLuks only gives an exit code but no output to stdout or stderr.
105
- if $CS isLuks " $2 " 2> /dev/null; then
105
+ if cryptsetup isLuks " $2 " 2> /dev/null; then
106
open=luksOpen
106
open=luksOpen
107
a=$2
107
a=$2
108
b=$1
108
b=$1
@@ -125,13 +125,13 @@ if [[ -f /etc/crypttab && $CS ]] && grep -q ^[^#] /etc/crypttab; then
125
fi
125
fi
126
if (( _overwriteokay == 0 )) ; then
126
if (( _overwriteokay == 0 )) ; then
127
false
127
false
128
- elif $CS -d /dev/urandom $4 $open " $a " " $b " > /dev/null; then
128
+ elif cryptsetup -d /dev/urandom $4 $open " $a " " $b " > /dev/null; then
129
stat_append " creating swapspace.."
129
stat_append " creating swapspace.."
130
mkswap -f -L $1 /dev/mapper/$1 > /dev/null
130
mkswap -f -L $1 /dev/mapper/$1 > /dev/null
131
fi ;;
131
fi ;;
132
ASK)
132
ASK)
133
printf " \nOpening '$1 ' volume:\n"
133
printf " \nOpening '$1 ' volume:\n"
134
- $CS $4 $open " $a " " $b " < /dev/console;;
134
+ cryptsetup $4 $open " $a " " $b " < /dev/console;;
135
/dev* )
135
/dev* )
136
local ckdev=${3%%:* }
136
local ckdev=${3%%:* }
137
local cka=${3#*: }
137
local cka=${3#*: }
@@ -153,13 +153,13 @@ if [[ -f /etc/crypttab && $CS ]] && grep -q ^[^#] /etc/crypttab; then
153
# cka is numeric: cka=offset, ckb=length
153
# cka is numeric: cka=offset, ckb=length
154
dd if=${ckdev} of=${ckfile} bs=1 skip=${cka} count=${ckb} > /dev/null 2>&1 ;;
154
dd if=${ckdev} of=${ckfile} bs=1 skip=${cka} count=${ckb} > /dev/null 2>&1 ;;
155
esac
155
esac
156
- $CS -d ${ckfile} $4 $open " $a " " $b " > /dev/null
156
+ cryptsetup -d ${ckfile} $4 $open " $a " " $b " > /dev/null
157
dd if=/dev/urandom of=${ckfile} bs=1 count=$( stat -c %s ${ckfile} ) conv=notrunc > /dev/null 2>&1
157
dd if=/dev/urandom of=${ckfile} bs=1 count=$( stat -c %s ${ckfile} ) conv=notrunc > /dev/null 2>&1
158
rm ${ckfile} ;;
158
rm ${ckfile} ;;
159
/* )
159
/* )
160
- $CS -d " $3 " $4 $open " $a " " $b " > /dev/null;;
160
+ cryptsetup -d " $3 " $4 $open " $a " " $b " > /dev/null;;
161
* )
161
* )
162
- echo " $3 " | $CS $4 $open " $a " " $b " > /dev/null;;
162
+ echo " $3 " | cryptsetup $4 $open " $a " " $b " > /dev/null;;
163
esac
163
esac
164
if (( $? )) ; then
164
if (( $? )) ; then
165
failed=1
165
failed=1
0 commit comments