I would prefer to keep it simple and clear:

#- cut here -------------------------------------------------------------------
--- mkboot.orig    2005-12-12 13:50:32.000000000 +0100
+++ mkboot 2006-11-05 13:11:12.000000000 +0100
@@ -17,7 +17,7 @@
 fi
 
 # root partition
-if [ $(mount | grep -o "^proc") ] && [ -e /proc/cmdline ]; then
+if [ $(mount | grep -o "^proc ") ] && [ -e /proc/cmdline ]; then
        rootpart=$(grep -o "root=[^ ]*" /proc/cmdline | cut -d \= -f 2)
 else
        which rdev >/dev/null && rootpart=$(rdev | cut -d ' ' -f 1)
#- cut here -------------------------------------------------------------------

We want to filter "proc on ..." with '^proc '. Filter with '^proc' which
matches "processor on" or "procwhatever on" could lead to unpredictable
behavior.

-- 
mkboot: line 20: [: proc: unary operator expected
https://launchpad.net/bugs/45388

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to