|
|
|
@ -133,10 +133,6 @@ function create_crypto()
|
|
|
|
|
# Parameter: device
|
|
|
|
|
{
|
|
|
|
|
local device="$1"
|
|
|
|
|
# flood the crypto partition with noise
|
|
|
|
|
# TODO: do we need "wipe"?
|
|
|
|
|
#$WIPE -kq -R /dev/urandom "${device}2"
|
|
|
|
|
|
|
|
|
|
# passphrase may be passed via command line
|
|
|
|
|
$CRYPTSETUP -h "$HASH" -c "$ALGO" create "`basename $CRYPTMAPPER_DEV`" "${device}2"
|
|
|
|
|
}
|
|
|
|
@ -145,6 +141,13 @@ function create_crypto()
|
|
|
|
|
function mkfs_crypto()
|
|
|
|
|
# split from create_crypto to allow background execution via web interface
|
|
|
|
|
{
|
|
|
|
|
local device=$(find_harddisk)
|
|
|
|
|
|
|
|
|
|
# flood the crypto partition with noise
|
|
|
|
|
# writing to the real partition is faster
|
|
|
|
|
# TODO: this takes _much_ too long - maybe add a "secure wipe" switch to the interface?
|
|
|
|
|
#dd if=/dev/urandom of="${device}2" bs=512
|
|
|
|
|
|
|
|
|
|
$MKFS_DATA "$CRYPTMAPPER_DEV"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|