]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
don't assume that a device file name consists of only alphanums.
authorokuji <okuji@localhost>
Tue, 10 Oct 2000 06:09:55 +0000 (06:09 +0000)
committerokuji <okuji@localhost>
Tue, 10 Oct 2000 06:09:55 +0000 (06:09 +0000)
ChangeLog
util/grub-install.in

index 593cc4cf78f269dd2670bc74f872982fc0feb44e..cd4b98c36833b8d561a2b9edd2ff617c448cff06 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2000-10-10  OKUJI Yoshinori  <okuji@gnu.org>
+
+       From Alessandro Rubini:
+       * util/grub-install.in (root_device): Use the regular expression
+       's%.*\(/dev/[^  ]*\).*%\1%' instead of
+       's%.*\(/dev/[a-z0-9]*\).*%\1%'.
+       (bootdir_device): Likewise.
+       (grubdir_device): Likewise.
+       
 2000-10-10  OKUJI Yoshinori  <okuji@gnu.org>
 
        * stage2/start.S (copy_buffer): Use pusha and popa instead of
index 6c3c2c487abc98ec562327f2976b338a83cdbf4d..e6d6df41b51a3be6d387982878f24085288ba488 100644 (file)
@@ -233,9 +233,9 @@ esac
 # For now, this uses the program `df' to get the device name, but is
 # this really portable?
 root_device=`df ${rootdir}/ | grep /dev/ \
-    | sed 's%.*\(/dev/[a-z0-9]*\).*%\1%'`
+    | sed 's%.*\(/dev/[^       ]*\).*%\1%'`
 bootdir_device=`df ${bootdir} | grep /dev/ \
-    | sed 's%.*\(/dev/[a-z0-9]*\).*%\1%'`
+    | sed 's%.*\(/dev/[^       ]*\).*%\1%'`
 
 # Check if the boot directory is in the same device as the root directory.
 if test "x$root_device" != "x$bootdir_device"; then
@@ -253,7 +253,7 @@ fi
 # Check if the root directory exists in the same device as the grub
 # directory.
 grubdir_device=`df ${grubdir} | grep /dev/ \
-    | sed 's%.*\(/dev/[a-z0-9]*\).*%\1%'`
+    | sed 's%.*\(/dev/[^       ]*\).*%\1%'`
 if test "x$grubdir_device" != "x$root_device"; then
     # For now, cannot deal with this situation.
     cat <<EOF 1>&2