From cf220cca2db53c0cfd23af06621db6dca227729f Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Mon, 10 Nov 2014 23:42:34 -0500 Subject: install-lilo: More robustly get boot device --- diff --git a/install-lilo.sh b/install-lilo.sh index a421a36..6ec8555 100644 --- a/install-lilo.sh +++ b/install-lilo.sh @@ -21,7 +21,8 @@ main() 'please specify the boot and root devices' fi boot="$(mountpoint -n /boot | cut -d ' ' -f 1)" - boot="${boot%%[0-9]}" + boot="$(printf '%s\n' "${boot}" | \ + sed 's|^\([/a-zA-Z]*\)\([0-9]*\)|\1|')" root="$(mountpoint -n / | cut -d ' ' -f 1)" rootdev="$(printf '%s\n' "${root}" | \ sed 's|^\([/a-zA-Z]*\)\([0-9]*\)|\1|')" -- cgit v0.9.1