File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,9 @@ function unlock_device() {
9090 local l_mapper=$2
9191 local l_key_file=$3
9292
93- if cryptsetup status " $l_mapper " > /dev/null; then
93+ if [ " $l_device_uuid " == " none" ] || [ " $l_mapper " == " none" ]; then
94+ echo -e " Device not configured (device_uuid=\" $l_device_uuid \" ; mapper=\" $l_mapper \" ). Skipping.\n"
95+ elif cryptsetup status " $l_mapper " > /dev/null; then
9496 echo -e " Partition \" $l_mapper \" unlocked. Skipping.\n"
9597 else
9698 echo " Unlocking $l_mapper ..."
@@ -143,7 +145,9 @@ function mount_device() {
143145 local l_mapper=$1
144146 local l_mount=$2
145147
146- if mountpoint -q " /mnt/$l_mount " ; then
148+ if [ " $l_mapper " == " none" ] || [ " $l_mount " == " none" ]; then
149+ echo -e " Mount not configured (mapper=\" $l_mapper \" ; mount_point=\" $l_mount \" ). Skipping.\n"
150+ elif mountpoint -q " /mnt/$l_mount " ; then
147151 echo -e " Mountpoint \" $l_mount \" mounted. Skipping.\n"
148152 else
149153 echo " Mounting $l_mount ..."
You can’t perform that action at this time.
0 commit comments