How about:
for x in $(cat /proc/cmdline); do
case ${x} in
root=*)
case ${x} in
UUID=*)
ROOTDEVPATH=$ROOTDEVPATH/disk/by-uuid/${x#UUID=} ;;
*) ROOTDEVPATH=$ROOTDEVPATH/$x ;;
esac
;;
...
done
ROOTDEVPATH=$(readlink -f "/dev/$ROOTDEVPATH")
[...]
This supports the root=<device node> case. Hackers will thank you (I know I
will)
Extending it to support LABEL= would be easy too.
(Extra case statement used to avoid sed (slow) and ${//} (bash-
specific))
--
Ignoring a broken clock results in infinite reboots; not ignoring results in
fsck failure; no solution to this problem
https://bugs.launchpad.net/bugs/563618
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs