slitaz-boot-scripts diff etc/init.d/rcS @ rev 263

Clean up network.sh and use fgrep when possible in rcS
author Christophe Lincoln <pankso@slitaz.org>
date Mon May 16 00:51:01 2011 +0200 (2011-05-16)
parents a0f7424e5486
children 464ba1f4299a
line diff
     1.1 --- a/etc/init.d/rcS	Mon May 16 00:32:16 2011 +0200
     1.2 +++ b/etc/init.d/rcS	Mon May 16 00:51:01 2011 +0200
     1.3 @@ -135,7 +135,7 @@
     1.4  if [ -n "$CDROM" ]; then
     1.5  	DRIVE_NAME=${CDROM#/dev/}
     1.6  else
     1.7 -	DRIVE_NAME=`grep -s "drive name" /proc/sys/dev/cdrom/info | cut -f 3`
     1.8 +	DRIVE_NAME=$(fgrep -s "drive name" /proc/sys/dev/cdrom/info | cut -f 3)
     1.9  fi
    1.10  if [ -n "$DRIVE_NAME" -a ! "`readlink /dev/cdrom`" ]; then
    1.11  	echo -n "Creating symlink : /dev/cdrom..."
    1.12 @@ -143,7 +143,7 @@
    1.13  	ln -s /dev/$DRIVE_NAME /dev/dvd
    1.14  	status
    1.15  fi
    1.16 -if ! grep -q "/dev/cdrom" /etc/fstab; then
    1.17 +if ! fgrep -q "/dev/cdrom" /etc/fstab; then
    1.18  	echo -n "Adding /dev/cdrom  to fstab..."
    1.19  	echo '/dev/cdrom      /media/cdrom iso9660 user,ro,noauto       0       0' \
    1.20  		>> /etc/fstab