livecd: rc.live, livecd - changes suggested by twittner - +D for l...

havner havner at pld-linux.org
Mon Jul 10 13:24:43 CEST 2006


Author: havner                       Date: Mon Jul 10 11:24:43 2006 GMT
Module: livecd                        Tag: HEAD
---- Log message:
- changes suggested by twittner
- +D for lsof, -o for test instead ||

---- Files affected:
livecd:
   rc.live (1.26 -> 1.27) , livecd (1.5 -> 1.6) 

---- Diffs:

================================================================
Index: livecd/rc.live
diff -u livecd/rc.live:1.26 livecd/rc.live:1.27
--- livecd/rc.live:1.26	Fri Jun 23 17:27:14 2006
+++ livecd/rc.live	Mon Jul 10 13:24:38 2006
@@ -533,7 +533,7 @@
 	umount -n /media/floppy >/dev/null 2>&1
 fi
 
-chown -R user.users /home/users/user
+chown -R user:users /home/users/user
 
 #if getparam debug > /dev/null; then
 #	dmesg -n $CONSOLE_LOGLEVEL

================================================================
Index: livecd/livecd
diff -u livecd/livecd:1.5 livecd/livecd:1.6
--- livecd/livecd:1.5	Mon Feb 27 21:54:52 2006
+++ livecd/livecd	Mon Jul 10 13:24:38 2006
@@ -20,12 +20,12 @@
 	start|restart|reload|force-reload)
 	CHARS="LiveCD: "
 
-	for I in `cat /etc/modprobe.conf | grep "^alias eth" | awk '{print $2}'`; do
+	for I in `awk '/^[ \t]*alias[ \t]+eth/ {print $2}' /etc/modprobe.conf`; do
 		modprobe $I > /dev/null 2>&1
 	done
 
 	for I in $DHCP_INTERFACES; do
-		if [ "`dmesg | grep $I`" != "" ] || [ "`cat /etc/modprobe.conf | grep $I`" != "" ]; then
+		if [ "`dmesg | grep $I`" != "" -o "`grep $I /etc/modprobe.conf`" != "" ]; then
 			show "Backgrounding DHCP for $I"
 			busy
 			dhcpcd "$I" &
@@ -36,7 +36,7 @@
 	show "Loading mixer settings for detected audio devices"
 	busy
 	COUNT=0
-	for I in `grep snd-card-[0-9] /etc/modprobe.conf | awk '{print $3}'`; do
+	for I in `awk '/snd-card-[0-9]/ {print $3}' /etc/modprobe.conf`; do
 		if [ ${COUNT} -eq 0 ]; then
 			aumix -d /dev/mixer -L > /dev/null 2>&1
 		else
@@ -51,7 +51,7 @@
 	stop)
 	CHARS="LiveCD: "
 	if [ "`cat /proc/mounts | grep \/home\/users`" != "" ]; then
-		for I in `lsof /home/users | grep -v COMMAND | awk '{print $2}' | sort | uniq`; do
+		for I in `lsof +D /home/users | awk '!/COMMAND/ {print $2}' | sort | uniq`; do
 			kill -15 $I > /dev/null 2>&1
 			kill -9 $I > /dev/null 2>&1
 		done
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/livecd/rc.live?r1=1.26&r2=1.27&f=u
    http://cvs.pld-linux.org/livecd/livecd?r1=1.5&r2=1.6&f=u



More information about the pld-cvs-commit mailing list