From: Silvio Rhatto Date: Wed, 4 Jan 2012 21:06:38 +0000 (-0200) Subject: Another device check at bootless X-Git-Tag: 0.1~199 X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=cf43055626f2405a751d5a560739c938d38d6274;p=hydra.git Another device check at bootless --- diff --git a/share/hydra/bootless b/share/hydra/bootless index 5bf6ed4..efc4b05 100755 --- a/share/hydra/bootless +++ b/share/hydra/bootless @@ -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}