Attached patch fixes the problem.

-- 
Hasso Tepper
--- /sbin/update-grub.orig	2006-04-08 19:04:03.000000000 +0300
+++ /sbin/update-grub	2006-04-08 19:10:36.000000000 +0300
@@ -154,16 +154,16 @@
 		exit 1
     fi
 
-	host_os=`uname -s | tr '[A-Z]' '[a-z]'`
+	host_os=`uname -s | tr '[[:upper:]]' '[[:lower:]]'`
 
     # Break the device name into the disk part and the partition part.
     case "$host_os" in
     linux)
-		tmp_disk=`echo "$1" | sed -e 's%\([sh]d[a-z]\)[0-9]*$%\1%' \
+		tmp_disk=`echo "$1" | sed -e 's%\([sh]d[[:lower:]]\)[0-9]*$%\1%' \
 				  -e 's%\(fd[0-9]*\)$%\1%' \
 				  -e 's%/part[0-9]*$%/disc%' \
 				  -e 's%\(c[0-7]d[0-9]*\).*$%\1%'`
-		tmp_part=`echo "$1" | sed -e 's%.*/[sh]d[a-z]\([0-9]*\)$%\1%' \
+		tmp_part=`echo "$1" | sed -e 's%.*/[sh]d[[:lower:]]\([0-9]*\)$%\1%' \
 				  -e 's%.*/fd[0-9]*$%%' \
 				  -e 's%.*/floppy/[0-9]*$%%' \
 				  -e 's%.*/\(disc\|part\([0-9]*\)\)$%\2%' \
@@ -470,8 +470,8 @@
         v2=$(echo $v2 | sed -e 's!^\(.*-\([0-9]\+\.\)\{2\}[0-9]\+\)\( .*\)!\1.0 \3!g')
           
 	# Then split the version number and remove any '.' 's or dashes
-	v1=$(echo $v1 | sed -e 's![-\.]\+! !g' -e 's!\([0-9]\)\([A-Za-z]\)!\1 \2!')
-	v2=$(echo $v2 | sed -e 's![-\.]\+! !g' -e 's!\([0-9]\)\([A-Za-z]\)!\1 \2!')
+	v1=$(echo $v1 | sed -e 's![-\.]\+! !g' -e 's!\([0-9]\)\([[:alpha:]]\)!\1 \2!')
+	v2=$(echo $v2 | sed -e 's![-\.]\+! !g' -e 's!\([0-9]\)\([[:alpha:]]\)!\1 \2!')
 
 	# we weight different kernel suffixes here
 	# ac   = 50
@@ -660,9 +660,9 @@
 test -z "$(GetMenuOpt "kopt" "")" && kopt_2_6="root=$root_device_2_6 ro"
 
 # Extract options for specific kernels
-opts="$(ExtractMenuOpts "\(kopt_[a-zA-Z0-9_]\+\)")"
+opts="$(ExtractMenuOpts "\(kopt_[[:alnum:]_]\+\)")"
 test -z "$opts" || eval "$opts"
-CustomKopts=$(GetMenuOpts "\(kopt_[a-zA-Z0-9_]\+\)")
+CustomKopts=$(GetMenuOpts "\(kopt_[[:alnum:]_]\+\)")
 
 # Extract the grub root
 grub_root_device=$(GetMenuOpt "groot" "$grub_root_device")

Reply via email to