ppcrcd/trunk/initrd.dir/linuxrc

sparky cvs at pld-linux.org
Thu Mar 16 17:28:58 CET 2006


Author: sparky
Date: Thu Mar 16 17:28:54 2006
New Revision: 7193

Modified:
   ppcrcd/trunk/initrd.dir/linuxrc
Log:
- load configuration automatically if it's in same place as ppcrcd.sqf


Modified: ppcrcd/trunk/initrd.dir/linuxrc
==============================================================================
--- ppcrcd/trunk/initrd.dir/linuxrc	(original)
+++ ppcrcd/trunk/initrd.dir/linuxrc	Thu Mar 16 17:28:54 2006
@@ -181,6 +181,22 @@
 /bin/chmod -R +w /dev
 /bin/touch /fastboot
 
+CONFIG=""
+for CFILE in /media/ppcrcd/ppcrcd.xml{,.gz}; do
+	if /bin/test -r $CFILE; then
+		/bin/echo "${cG}*** Found configuration file${cE}"
+		CONFIG="$CFILE"
+	fi
+done
+if /bin/test -n "$CONFIG"; then
+	/bin/echo "${cG}*** Extracting configuration${cE}"
+	{ /bin/gunzip -c $CFILE || /bin/cat $CFILE; } | \
+		/usr/lib/ppcrcd/xmluntar.pl
+	/bin/test -r etc/fstab.add && \
+		{ /bin/echo "#Saved:"; /bin/cat etc/fstab.add; } >> etc/fstab
+	/bin/rm -f etc/fstab.add	
+done
+
 if $B/test -n "$TOMEM"; then
 	/bin/umount /media/ppcrcd
 	/bin/rmdir /media/ppcrcd
@@ -199,4 +215,3 @@
 /bin/echo "${cY}*** Starting${cE}"
 
 exec /usr/sbin/chroot . /sbin/init <dev/console >dev/console 2>&1
-


More information about the pld-cvs-commit mailing list