Podsyłam sugestie zmian dot. skryptów LiveCD (nie testowałem, ale powinny być
OK) - proszę o przejrzenie i ew. commitnięcie przez osoby uprawnione [nie mam
dostępu do modułu cvs/livecd] - zastępują one używanie konstrukcji typu:
cat plik | grep foo | awk '{print $2}'
awk '/foo/ {print $2}' plik
Po za tym: grep "^alias eth" - czy przed `alias' nie może być spacji, i co gdy
po `alias' będą 2 spacje lub/i tabulator(y)?
--
Tomasz Wittner
Index: rc.live
===================================================================
RCS file: /cvsroot/livecd/rc.live,v
retrieving revision 1.25
diff -u -r1.25 rc.live
--- rc.live 27 Feb 2006 19:51:46 -0000 1.25
+++ rc.live 17 Apr 2006 15:19:42 -0000
@@ -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
===================================================================
RCS file: /cvsroot/livecd/livecd,v
retrieving revision 1.5
diff -u -r1.5 livecd
--- livecd 27 Feb 2006 20:54:52 -0000 1.5
+++ livecd 17 Apr 2006 15:19:42 -0000
@@ -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`" != "" ] || [ "`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 /home/users | awk '!/COMMAND/ {print $2}' | sort | uniq`; do
kill -15 $I > /dev/null 2>&1
kill -9 $I > /dev/null 2>&1
done
_______________________________________________
pld-devel-pl mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-devel-pl