CVS: initscripts/rc.d rc.sysinit,1.6,1.7

Jasper Huysmans jasper at lunar-linux.org
Thu Nov 6 13:52:11 GMT 2003


Update of /var/cvs/lunar/initscripts/rc.d
In directory dbguin.lunar-linux.org:/tmp/cvs-serv25448

Modified Files:
	rc.sysinit 
Log Message:
change grep to fgrep where possible (syncing with RH cvs)

Index: rc.sysinit
===================================================================
RCS file: /var/cvs/lunar/initscripts/rc.d/rc.sysinit,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- rc.sysinit	6 Nov 2003 13:28:24 -0000	1.6
+++ rc.sysinit	6 Nov 2003 13:52:09 -0000	1.7
@@ -65,7 +65,7 @@
 
 # Print a text banner.
 echo -en $"\tWelcome to "
-if LC_ALL=C grep -q "Lunar Linux" /etc/lunar.release ; then 
+if LC_ALL=C fgrep -q "Lunar Linux" /etc/lunar.release ; then 
   [ "$BOOTUP" = "color" ] && echo -en "\\033[0;31m"
   echo -en "Lunar Linux"
   [ "$BOOTUP" = "color" ] && echo -en "\\033[0;39m"
@@ -94,8 +94,8 @@
  # fi
 
 # Unmount the initrd, if necessary
-if LC_ALL=C grep -q /initrd /proc/mounts && \
-  ! LC_ALL=C grep -q /initrd/loopfs /proc/mounts 
+if LC_ALL=C fgrep -q /initrd /proc/mounts && \
+  ! LC_ALL=C fgrep -q /initrd/loopfs /proc/mounts 
 then
   if [ -e /initrd/dev/.devfsd ]; then
     umount /initrd/dev
@@ -192,7 +192,7 @@
  # update_boot_stage RCusb
 usb=0
 if ! strstr "$cmdline" nousb ; then
-  if ! LC_ALL=C grep -q "usb" /proc/devices 2>/dev/null ; then
+  if ! LC_ALL=C fgrep -q "usb" /proc/devices 2>/dev/null ; then
     aliases=`/sbin/modprobe -c | awk '/^alias usb-controller/ { print $3 }'`
     if [ -n "$aliases" -a "$aliases" != "off" ]; then
       modprobe usbcore
@@ -203,7 +203,7 @@
       [ $? -eq 0 -a -n "$aliases" ] && usb=1
     fi
   fi
-  if LC_ALL=C grep -q "usb" /proc/devices 2>/dev/null ; then
+  if LC_ALL=C fgrep -q "usb" /proc/devices 2>/dev/null ; then
     usb=1
   fi
 fi
@@ -215,7 +215,7 @@
 needusbstorage=
 if [ $usb = "1" ]; then
   needusbstorage=`LC_ALL=C grep -e "^I.*Cls=08" /proc/bus/usb/devices 2>/dev/null`
-  LC_ALL=C grep -q 'hid' /proc/bus/usb/drivers 2>/dev/null || \
+  LC_ALL=C fgrep -q 'hid' /proc/bus/usb/drivers 2>/dev/null || \
     action $"Initializing USB HID interface: " modprobe hid 2> /dev/null
 
   if [ -z "$TWODOTSIX" ] ; then
@@ -319,7 +319,7 @@
 
 # Possibly update quotas if fsck was run on /.
 LC_ALL=C grep -E '[[:space:]]+/[[:space:]]+' /etc/fstab | \
-  awk '{ print $4 }' | LC_ALL=C grep -q quota
+  awk '{ print $4 }' | LC_ALL=C fgrep -q quota
 _ROOT_HAS_QUOTA=$?
 if [ X"$_RUN_QUOTACHECK" = X1 -a "$_ROOT_HAS_QUOTA" = "0" -a \
   -x /sbin/quotacheck ]; then
@@ -397,7 +397,7 @@
   # If they aren't using a recent sane kernel, make a link for them
   if ! strstr $unamer -  ; then
     ktag="`cat /proc/version`"
-    mtag=`LC_ALL=C grep -l "$ktag" /lib/modules/*/.rhkmvtag 2> /dev/null`
+    mtag=`LC_ALL=C fgrep -l "$ktag" /lib/modules/*/.rhkmvtag 2> /dev/null`
     if [ -n "$mtag" ]; then
       mver=$(echo $mtag | sed -e 's,/lib/modules/,,' -e 's,/.rhkmvtag,,' \
 	-e 's,[       ].*$,,')
@@ -419,7 +419,7 @@
 fi
 
 # Load sound modules if and only if they need persistent DMA buffers
-if LC_ALL=C grep -q "options sound dmabuf=1" /etc/modules.conf 2>/dev/null ; then
+if LC_ALL=C fgrep -q "options sound dmabuf=1" /etc/modules.conf 2>/dev/null ; then
   alias=`/sbin/modprobe -c | awk '/^alias sound / { print $3 }'`
   if [ -n "$alias" -a "$alias" != "off" ]; then
     action $"Loading sound module ($alias): " modprobe sound
@@ -473,7 +473,7 @@
 	  RESULT=0
 	  RAIDDEV="$RAIDDEV(skipped)"
 	fi
-	NOAUTO=`LC_ALL=C grep "^$i" /etc/fstab | LC_ALL=C grep -c "noauto"`
+	NOAUTO=`LC_ALL=C grep "^$i" /etc/fstab | LC_ALL=C fgrep -c "noauto"`
 	if [ $NOAUTO -gt 0 ]; then
 	  RESULT=0
 	  RAIDDEV="$RAIDDEV(skipped)"
@@ -706,8 +706,8 @@
   # If a SCSI tape has been detected, load the st module unconditionally
   # since many SCSI tapes don't deal well with st being loaded and unloaded
   if [ -f /proc/scsi/scsi -a -n "$USEMODULES" ]; then
-    if LC_ALL=C grep -q 'Type:   Sequential-Access' /proc/scsi/scsi 2>/dev/null ; then
-      if LC_ALL=C grep -qv ' 9 st' /proc/devices ; then
+    if LC_ALL=C fgrep -q 'Type:   Sequential-Access' /proc/scsi/scsi 2>/dev/null ; then
+      if LC_ALL=C fgrep -qv ' 9 st' /proc/devices ; then
 	modprobe st >/dev/null 2>&1
       fi
     fi
@@ -726,7 +726,7 @@
       	[ "$alias" = "off" ] && continue
 	action $"Initializing firewire controller ($alias): " modprobe $alias
       done
-      LC_ALL=C grep -q "SBP2" /proc/bus/ieee1394/devices 2>/dev/null && \
+      LC_ALL=C fgrep -q "SBP2" /proc/bus/ieee1394/devices 2>/dev/null && \
 	modprobe sbp2 >/dev/null 2>&1
     fi
   fi




More information about the Lunar-commits mailing list