13 start_cmd="encswap_attach"
14 stop_cmd="encswap_detach"
18 while read device mountpoint type options rest ; do
19 case ":${device}:${type}:${options}" in
24 passphrase=`dd if=/dev/random count=1 2>/dev/null | md5 -q`
25 device="${device%.bde}"
26 gbde init "${device}" -P "${passphrase}" || return 1
27 gbde attach "${device}" -p "${passphrase}" || return 1
30 device="${device%.eli}"
31 geli onetime ${geli_swap_flags} "${device}" || return 1
39 while read device mountpoint type options rest ; do
40 case ":${device}:${type}:${options}" in
45 device="${device%.bde}"
46 gbde detach "${device}"
49 # Nothing here, because geli swap devices should be
50 # created with the auto-detach-on-last-close option.