summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--install-lilo.sh3
1 files changed, 2 insertions, 1 deletions
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|')"