diff options
Diffstat (limited to 'write-and-config.sh')
-rwxr-xr-x | write-and-config.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/write-and-config.sh b/write-and-config.sh index 17bf0ac..ce21afe 100755 --- a/write-and-config.sh +++ b/write-and-config.sh @@ -5,6 +5,11 @@ set -euo pipefail config="$1" dev="$2" +if ! blkid "$dev" >/dev/null; then + echo "$dev is not a block device" 1>&2 + exit 1 +fi + echo "Unmounting everything in $dev" umount -fv "$dev"* || true echo "Write installer.img to $dev" |