r8167 - in trunk/bootscripts: . lfs/init.d lfs/sysconfig/network-devices

dnicholson at linuxfromscratch.org dnicholson at linuxfromscratch.org
Sat Jun 16 13:47:37 PDT 2007


Author: dnicholson
Date: 2007-06-16 14:47:37 -0600 (Sat, 16 Jun 2007)
New Revision: 8167

Modified:
   trunk/bootscripts/ChangeLog
   trunk/bootscripts/lfs/init.d/modules
   trunk/bootscripts/lfs/init.d/mountfs
   trunk/bootscripts/lfs/init.d/mountkernfs
   trunk/bootscripts/lfs/init.d/setclock
   trunk/bootscripts/lfs/sysconfig/network-devices/ifdown
   trunk/bootscripts/lfs/sysconfig/network-devices/ifup
Log:
Don't suppress stderr in bootscripts when not necessary


Modified: trunk/bootscripts/ChangeLog
===================================================================
--- trunk/bootscripts/ChangeLog	2007-06-14 20:39:49 UTC (rev 8166)
+++ trunk/bootscripts/ChangeLog	2007-06-16 20:47:37 UTC (rev 8167)
@@ -1,3 +1,9 @@
+2007-06-16	Dan Nicholson	<dnicholson at linuxfromscratch.org>
+	* lfs/init.d/mountfs, lfs/init.d/mountkernfs, lfs/init.d/setclock,
+	  lfs/init.d/modules, lfs/sysconfig/network-devices/if{up,down}:
+	  Don't suppress stderr during bootscripts unless necessary. This
+	  would prevent potentially critical messages from reaching the screen.
+
 2007-04-24	Dan Nicholson	<dnicholson at linuxfromscratch.org>
 	* lfs/init.d/functions: When killproc is executed, it checks that
 	  the process is still running, sleeps if it is, then checks again.

Modified: trunk/bootscripts/lfs/init.d/modules
===================================================================
--- trunk/bootscripts/lfs/init.d/modules	2007-06-14 20:39:49 UTC (rev 8166)
+++ trunk/bootscripts/lfs/init.d/modules	2007-06-16 20:47:37 UTC (rev 8167)
@@ -54,7 +54,7 @@
 
 					# Attempt to load the module, making
 					# sure to pass any arguments provided.
-					modprobe ${module} ${args} 2>&1 > /dev/null
+					modprobe ${module} ${args} > /dev/null
 
 					# Print the module name if successful,
 					# otherwise take note.

Modified: trunk/bootscripts/lfs/init.d/mountfs
===================================================================
--- trunk/bootscripts/lfs/init.d/mountfs	2007-06-14 20:39:49 UTC (rev 8166)
+++ trunk/bootscripts/lfs/init.d/mountfs	2007-06-16 20:47:37 UTC (rev 8167)
@@ -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 2>&1
+		mount -n -o remount,rw / >/dev/null
 		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 2>&1
+		mount -a -O no_netdev >/dev/null
 		evaluate_retval
 		;;
 
 	stop)
 		boot_mesg "Unmounting all other currently mounted file systems..."
-		umount -a -d -r >/dev/null 2>&1
+		umount -a -d -r >/dev/null
 		evaluate_retval
 		;;
 

Modified: trunk/bootscripts/lfs/init.d/mountkernfs
===================================================================
--- trunk/bootscripts/lfs/init.d/mountkernfs	2007-06-14 20:39:49 UTC (rev 8166)
+++ trunk/bootscripts/lfs/init.d/mountkernfs	2007-06-16 20:47:37 UTC (rev 8167)
@@ -19,12 +19,12 @@
 	start)
 		boot_mesg -n "Mounting kernel-based file systems:" ${INFO}
 
-		if ! mountpoint /proc >/dev/null 2>&1; then
+		if ! mountpoint /proc >/dev/null; then
 			boot_mesg -n " /proc" ${NORMAL}
 			mount -n /proc || failed=1
 		fi
 
-		if ! mountpoint /sys >/dev/null 2>&1; then
+		if ! mountpoint /sys >/dev/null; 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-06-14 20:39:49 UTC (rev 8166)
+++ trunk/bootscripts/lfs/init.d/setclock	2007-06-16 20:47:37 UTC (rev 8167)
@@ -32,13 +32,13 @@
 case ${1} in
 	start)
 		boot_mesg "Setting system clock..."
-		hwclock --hctosys ${CLOCKPARAMS} >/dev/null 2>&1
+		hwclock --hctosys ${CLOCKPARAMS} >/dev/null
 		evaluate_retval
 		;;
 
 	stop)
 		boot_mesg "Setting hardware clock..."
-		hwclock --systohc ${CLOCKPARAMS} >/dev/null 2>&1
+		hwclock --systohc ${CLOCKPARAMS} >/dev/null
 		evaluate_retval
 		;;
 

Modified: trunk/bootscripts/lfs/sysconfig/network-devices/ifdown
===================================================================
--- trunk/bootscripts/lfs/sysconfig/network-devices/ifdown	2007-06-14 20:39:49 UTC (rev 8166)
+++ trunk/bootscripts/lfs/sysconfig/network-devices/ifdown	2007-06-16 20:47:37 UTC (rev 8167)
@@ -82,7 +82,7 @@
 done
 
 if [ -z "${2}" ]; then
-	link_status=`ip link show $1 2> /dev/null`
+	link_status=`ip link show $1`
 	if [ -n "${link_status}" ]; then
 		if echo "${link_status}" | grep -q UP; then
 			boot_mesg "Bringing down the ${1} interface..."

Modified: trunk/bootscripts/lfs/sysconfig/network-devices/ifup
===================================================================
--- trunk/bootscripts/lfs/sysconfig/network-devices/ifup	2007-06-14 20:39:49 UTC (rev 8166)
+++ trunk/bootscripts/lfs/sysconfig/network-devices/ifup	2007-06-16 20:47:37 UTC (rev 8167)
@@ -63,7 +63,7 @@
 		if [ -n "${SERVICE}" -a -x "${network_devices}/services/${SERVICE}" ]; then
 			if [ -z "${CHECK_LINK}" -o "${CHECK_LINK}" = "y" -o "${CHECK_LINK}" = "yes" -o "${CHECK_LINK}" = "1" ]; then
 				if ip link show ${1} > /dev/null 2>&1; then
-					link_status=`ip link show ${1} 2> /dev/null`
+					link_status=`ip link show ${1}`
 					if [ -n "${link_status}" ]; then
 						if ! echo "${link_status}" | grep -q UP; then
 							ip link set ${1} up




More information about the lfs-book mailing list