From cf43055626f2405a751d5a560739c938d38d6274 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Wed, 4 Jan 2012 19:06:38 -0200 Subject: Another device check at bootless --- share/hydra/bootless | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'share') 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} -- cgit v1.2.3