chiark / gitweb /
functions: resolve symlinks in the device name
authorwry@onyx <wry@onyx>
Tue, 10 Aug 2010 23:00:43 +0000 (00:00 +0100)
committerwry@onyx <wry@onyx>
Tue, 10 Aug 2010 23:00:43 +0000 (00:00 +0100)
chiark-cryptdisk/functions
debian/changelog

index 03cb5f9..3382ebe 100644 (file)
@@ -12,6 +12,11 @@ case "$dev" in
 *)     ;;
 esac
 
+# cope with symlinks (e.g. made by udev)
+if [ -L /dev/$dev ]; then
+    dev=`basename $(readlink -f /dev/$dev)`
+fi
+
 echo "using device $dev"
 echo "using devmapper name $mapname"
 echo "using mountpoint $mnt"
index e6adba8..1c21609 100644 (file)
@@ -2,8 +2,9 @@ chiark-cryptdisk (0.2.3) lucid; urgency=low
 
   * search-for-sata shebang should be bash, not sh.
   * create search-for-usb script 
+  * functions: resolve symlinks in the device name 
 
- -- Ross Younger <0ryoungerk.launchpad@coriolis.greenend.org.uk>  Tue, 10 Aug 2010 23:46:59 +0100
+ -- Ross Younger <0ryoungerk.launchpad@coriolis.greenend.org.uk>  Wed, 11 Aug 2010 00:00:12 +0100
 
 chiark-cryptdisk (0.2.2) unstable; urgency=low