]> gitweb.fluxo.info Git - hydra.git/commitdiff
Another device check at bootless
authorSilvio Rhatto <rhatto@riseup.net>
Wed, 4 Jan 2012 21:06:38 +0000 (19:06 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Wed, 4 Jan 2012 21:06:38 +0000 (19:06 -0200)
share/hydra/bootless

index 5bf6ed4830d91160985e3761b973d79a9b136c09..efc4b052819ba5ce18f36c6ba943608bfa2921ea 100755 (executable)
@@ -99,7 +99,11 @@ EOF
     exit 1
   fi
 
-  # TODO: check if $device exists
+  # Target device consistency check
+  if [ ! -b ${device} ]; then
+    echo "Error: device \"${device}\" not found."
+    exit 1
+  fi
   
   # Format and mount
   $sudo mke2fs ${device}