Author: dnicholson
Date: 2007-02-22 15:45:54 -0700 (Thu, 22 Feb 2007)
New Revision: 7931

Modified:
   trunk/bootscripts/ChangeLog
   trunk/bootscripts/lfs/init.d/console
   trunk/bootscripts/lfs/init.d/mountfs
   trunk/bootscripts/lfs/init.d/mountkernfs
   trunk/bootscripts/lfs/init.d/setclock
Log:
Change &> redirection to >file 2>&1 for POSIX shells.


Modified: trunk/bootscripts/ChangeLog
===================================================================
--- trunk/bootscripts/ChangeLog 2007-02-22 22:41:03 UTC (rev 7930)
+++ trunk/bootscripts/ChangeLog 2007-02-22 22:45:54 UTC (rev 7931)
@@ -1,4 +1,9 @@
 2007-02-22     Dan Nicholson   <[EMAIL PROTECTED]>
+       * lfs/init.d/mountfs, lfs/init.d/console, lfs/init.d/setclock,
+         lfs/init.d/mountkernfs: &> redirection is not supported in POSIX.
+         Fortunately, it's equivalent to >word 2>&1 according to bash(1).
+
+2007-02-22     Dan Nicholson   <[EMAIL PROTECTED]>
        * lfs/init.d/console: POSIX says that shells only need to trap on
          signals. Trapping on ERR isn't always supported. Conditionals have
          been added to set the $failed variable in spots that seemed

Modified: trunk/bootscripts/lfs/init.d/console
===================================================================
--- trunk/bootscripts/lfs/init.d/console        2007-02-22 22:41:03 UTC (rev 
7930)
+++ trunk/bootscripts/lfs/init.d/console        2007-02-22 22:45:54 UTC (rev 
7931)
@@ -70,10 +70,10 @@
                        setfont $FONT ||
                        failed=1
                [ -z "${KEYMAP}" ] ||
-                       loadkeys ${KEYMAP} &>/dev/null ||
+                       loadkeys ${KEYMAP} >/dev/null 2>&1 ||
                        failed=1
                [ -z "${KEYMAP_CORRECTIONS}" ] ||
-                       loadkeys ${KEYMAP_CORRECTIONS} &>/dev/null ||
+                       loadkeys ${KEYMAP_CORRECTIONS} >/dev/null 2>&1 ||
                        failed=1
 
                # Linux kernel generates wrong bytes when composing
@@ -86,13 +86,13 @@
 
                [ -n "$BROKEN_COMPOSE" ] || BROKEN_COMPOSE="$UNICODE"
                ! is_true "$BROKEN_COMPOSE" ||
-                       echo "" | loadkeys -c &>/dev/null ||
+                       echo "" | loadkeys -c >/dev/null 2>&1 ||
                        failed=1
                
                # Convert the keymap from $LEGACY_CHARSET to UTF-8
                [ -z "$LEGACY_CHARSET" ] ||
                        dumpkeys -c "$LEGACY_CHARSET" |
-                       loadkeys -u &>/dev/null ||
+                       loadkeys -u >/dev/null 2>&1 ||
                        failed=1
 
                # If any of the commands above failed, the trap at the

Modified: trunk/bootscripts/lfs/init.d/mountfs
===================================================================
--- trunk/bootscripts/lfs/init.d/mountfs        2007-02-22 22:41:03 UTC (rev 
7930)
+++ trunk/bootscripts/lfs/init.d/mountfs        2007-02-22 22:45:54 UTC (rev 
7931)
@@ -18,7 +18,7 @@
 case "${1}" in
        start)
                boot_mesg "Remounting root file system in read-write mode..."
-               mount -n -o remount,rw / &>/dev/null
+               mount -n -o remount,rw / >/dev/null 2>&1
                evaluate_retval
 
                # Remove fsck-related file system watermarks.
@@ -35,13 +35,13 @@
                # This will mount all filesystems that do not have _netdev in
                # their option list.  _netdev denotes a network filesystem.
                boot_mesg "Mounting remaining file systems..."
-               mount -a -O no_netdev &>/dev/null
+               mount -a -O no_netdev >/dev/null 2>&1
                evaluate_retval
                ;;
 
        stop)
                boot_mesg "Unmounting all other currently mounted file 
systems..."
-               umount -a -d -r &>/dev/null
+               umount -a -d -r >/dev/null 2>&1
                evaluate_retval
                ;;
 

Modified: trunk/bootscripts/lfs/init.d/mountkernfs
===================================================================
--- trunk/bootscripts/lfs/init.d/mountkernfs    2007-02-22 22:41:03 UTC (rev 
7930)
+++ trunk/bootscripts/lfs/init.d/mountkernfs    2007-02-22 22:45:54 UTC (rev 
7931)
@@ -19,12 +19,12 @@
        start)
                boot_mesg -n "Mounting kernel-based file systems:" ${INFO}
 
-               if ! mountpoint /proc &> /dev/null; then
+               if ! mountpoint /proc >/dev/null 2>&1; then
                        boot_mesg -n " /proc" ${NORMAL}
                        mount -n /proc || failed=1
                fi
 
-               if ! mountpoint /sys &> /dev/null; then
+               if ! mountpoint /sys >/dev/null 2>&1; then
                        boot_mesg -n " /sys" ${NORMAL}
                        mount -n /sys || failed=1
                fi

Modified: trunk/bootscripts/lfs/init.d/setclock
===================================================================
--- trunk/bootscripts/lfs/init.d/setclock       2007-02-22 22:41:03 UTC (rev 
7930)
+++ trunk/bootscripts/lfs/init.d/setclock       2007-02-22 22:45:54 UTC (rev 
7931)
@@ -32,13 +32,13 @@
 case ${1} in
        start)
                boot_mesg "Setting system clock..."
-               hwclock --hctosys ${CLOCKPARAMS} &>/dev/null
+               hwclock --hctosys ${CLOCKPARAMS} >/dev/null 2>&1
                evaluate_retval
                ;;
 
        stop)
                boot_mesg "Setting hardware clock..."
-               hwclock --systohc ${CLOCKPARAMS} &>/dev/null
+               hwclock --systohc ${CLOCKPARAMS} >/dev/null 2>&1
                evaluate_retval
                ;;
 

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-book
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to