|
@@ -1,12 +1,13 @@
|
|
#!/bin/bash
|
|
#!/bin/bash
|
|
|
|
|
|
# Overwrite default variables from config file
|
|
# Overwrite default variables from config file
|
|
|
|
+cd /installer
|
|
[ -f ./config.sh ] && source config.sh
|
|
[ -f ./config.sh ] && source config.sh
|
|
|
|
|
|
|
|
|
|
# Check if partition exists
|
|
# Check if partition exists
|
|
disk2=$disk"p3"
|
|
disk2=$disk"p3"
|
|
-if [ -b $disk2 ]
|
|
|
|
|
|
+if ! [ -b $disk2 ]
|
|
then
|
|
then
|
|
echo $disk2 does not exist!
|
|
echo $disk2 does not exist!
|
|
exit
|
|
exit
|
|
@@ -18,4 +19,4 @@ mkdir -p /srv/data
|
|
cryptsetup luksFormat $disk2
|
|
cryptsetup luksFormat $disk2
|
|
cryptsetup luksOpen $disk2 data
|
|
cryptsetup luksOpen $disk2 data
|
|
mkfs.ext4 /dev/mapper/data
|
|
mkfs.ext4 /dev/mapper/data
|
|
-mount /dev/mapper/data /srv/data
|
|
|
|
|
|
+mount /dev/mapper/data /srv/data
|