|
@@ -91,6 +91,9 @@ fi
|
|
|
if test -e "$file_path"
|
|
if test -e "$file_path"
|
|
|
then
|
|
then
|
|
|
test -f "$file_path" || ERR "${file_path} Is not a regular file" 1
|
|
test -f "$file_path" || ERR "${file_path} Is not a regular file" 1
|
|
|
|
|
+
|
|
|
|
|
+ file_type="$(file -b ${file_path} | cut -d' ' -f-2)"
|
|
|
|
|
+ test "$file_type" = 'LUKS encrypted' || ERR "${file_path} is not a LUKS encrypted file." 1
|
|
|
else
|
|
else
|
|
|
echo -n "File ${file_path} does not exist. Want to create? (Y/n) "
|
|
echo -n "File ${file_path} does not exist. Want to create? (Y/n) "
|
|
|
read choose
|
|
read choose
|