On 2/22/07, Bryan Kadzban <[EMAIL PROTECTED]> wrote:
However, it appears that &> is used in more scripts than just console
and mountkernfs; mountfs has 3 instances of it, and setclock has 2. I'd
try to get both of those scripts as well; +1 with those additions. :-)
Whoops. I thought I fixed those the other day. Anyway, here's that
patch. I'll commit these some time later today after I'm sure
everyone's had a chance to see them.
--
Dan
&> redirection is not supported in POSIX. Fortunately, it's
equivalent to >word 2>&1 according to bash(1).
Index: bootscripts/lfs/init.d/mountfs
===================================================================
--- bootscripts/lfs/init.d/mountfs (revision 7926)
+++ bootscripts/lfs/init.d/mountfs (working copy)
@@ -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
;;
Index: bootscripts/lfs/init.d/setclock
===================================================================
--- bootscripts/lfs/init.d/setclock (revision 7926)
+++ bootscripts/lfs/init.d/setclock (working copy)
@@ -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
;;
Index: bootscripts/lfs/init.d/mountkernfs
===================================================================
--- bootscripts/lfs/init.d/mountkernfs (revision 7926)
+++ bootscripts/lfs/init.d/mountkernfs (working copy)
@@ -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
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page