Bug#272139: /sys/block names are mangled with '!' in current 2.6 kernels, not '.'
* Colin Watson <cjwatson@debian.org> [2004-09-17 19:12]:
> http://www.no-name-yet.com/patches/initrd-tools.sys-block.diff
I've commited the patch from there; for the record, it is:
--- initrd-tools.orig/init 2004-08-20 19:11:41.000000000 +0100
+++ initrd-tools/init 2004-09-17 17:08:19.000000000 +0100
@@ -84,29 +84,34 @@
;;
esac
- IFS=/
- set -f
- set +f ${root#/dev/}
- IFS=.
- root=$*
- unset IFS
- try_name "$root" && return
-
- part=${root##*[!0-9]}
- root=${root%$part}
- if [ -z "$root" ]; then
- return
- fi
- try_name "$root" $part && return
+ origroot="$root"
+
+ for separator in . !; do
+ IFS=/
+ set -f
+ set +f ${origroot#/dev/}
+ IFS="$separator"
+ root=$*
+ unset IFS
+ try_name "$root" && return
+
+ part=${root##*[!0-9]}
+ root=${root%$part}
+ if [ -z "$root" ]; then
+ return
+ fi
+ try_name "$root" $part && return
+
+ case $root in
+ *[0-9]p)
+ ;;
+ *)
+ return 0
+ ;;
+ esac
+ try_name "${root%p}" $part && return
+ done
- case $root in
- *[0-9]p)
- ;;
- *)
- return 0
- ;;
- esac
- try_name "${root%p}" $part
return 0
}
--
Martin Michlmayr
tbm@cyrius.com
Reply to: