2014-10-19 15:27:33 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
if ! [ "$EUID" -eq 0 ]
|
|
|
|
then
|
|
|
|
echo "This must be run as root!" >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
echo -n "Password for data storage: "
|
|
|
|
read -s password
|
|
|
|
echo
|
|
|
|
|
|
|
|
echo $password | cryptsetup luksOpen /dev/sda3 zfs_hd_1
|
|
|
|
echo $password | cryptsetup luksOpen /dev/sdb3 zfs_hd_2
|
|
|
|
|
|
|
|
zfs mount -a
|
2015-09-08 22:40:33 +00:00
|
|
|
mount -a
|