ppcrcd/trunk/initrd.dir/linuxrc
sparky
cvs at pld-linux.org
Fri Mar 17 17:29:09 CET 2006
Author: sparky
Date: Fri Mar 17 17:29:06 2006
New Revision: 7210
Modified:
ppcrcd/trunk/initrd.dir/linuxrc
Log:
- ash is not smart enouht to expand /media/ppcrcd/ppcrcd.xml{,.gz} in for, fixed
- changed order to get the best of saved configuration
Modified: ppcrcd/trunk/initrd.dir/linuxrc
==============================================================================
--- ppcrcd/trunk/initrd.dir/linuxrc (original)
+++ ppcrcd/trunk/initrd.dir/linuxrc Fri Mar 17 17:29:06 2006
@@ -171,27 +171,18 @@
$B/mount -n -t none -o bind live/$f $f
done
-$B/echo "${cG}*** Preparing RW directories${cE}"
-# cp rw files
-/bin/cp -a /live/etc/skel /root
-/bin/chmod -R +w /root
-/bin/chmod +x /root/.bash*
-/bin/cp -a /live/etc /etc
-/bin/chmod -R +w /etc
-/bin/cp -a /live/var /var
-/bin/chmod -R +w /var
-/bin/cp -a /live/dev /dev
-/bin/chmod -R +w /dev
-/bin/touch /fastboot
-
CONFIG=""
-for CFILE in /media/ppcrcd/ppcrcd.xml{,.gz}; do
+for CFILE in /media/ppcrcd/ppcrcd.xml /media/ppcrcd/ppcrcd.xml.gz; do
if $B/test -r $CFILE; then
$B/echo "${cG}*** Found configuration file${cE}"
CONFIG="$CFILE"
break
fi
done
+
+/bin/cp -a /live/etc /etc
+/bin/chmod -R +w /etc
+
if $B/test -n "$CONFIG"; then
$B/echo "${cG}*** Extracting configuration${cE}"
{ /bin/gunzip -c $CFILE || $B/cat $CFILE; } | \
@@ -201,6 +192,18 @@
$B/rm -f etc/fstab.add
fi
+
+$B/echo "${cG}*** Preparing RW directories${cE}"
+# cp rw files
+/bin/cp -a /etc/skel /root
+/bin/chmod -R +w /root
+/bin/chmod +x /root/.bash*
+/bin/cp -a /live/var /var
+/bin/chmod -R +w /var
+/bin/cp -a /live/dev /dev
+/bin/chmod -R +w /dev
+/bin/touch /fastboot
+
if $B/test -n "$TOMEM"; then
/bin/umount /media/ppcrcd
/bin/rmdir /media/ppcrcd
More information about the pld-cvs-commit
mailing list