]> TLD Linux GIT Repositories - rc-scripts.git/commitdiff
- support devices by UUID
authorMarcin Krol <hawk@tld-linux.org>
Mon, 20 Aug 2018 13:39:26 +0000 (13:39 +0000)
committerMarcin Krol <hawk@tld-linux.org>
Mon, 20 Aug 2018 13:39:26 +0000 (13:39 +0000)
rc.d/init.d/cryptsetup

index 0e7f27222619bdf9750b0691e15aeddae5af12b8..e2ff60efc91dad66ae5117764aec445c5e7dcd9a 100755 (executable)
@@ -95,6 +95,10 @@ init_crypto() {
                        continue
                fi
 
+               if echo "$src" | grep -q -E "^UUID=" ; then
+                       src="/dev/disk/by-uuid/${src##UUID=}"
+               fi
+
                if [ ! -b "$src"  ]; then
                        nls "$src: No such device"
                        ret=1