Author: arekm
Date: Sat Jan 27 00:51:58 2007
New Revision: 8197
Modified:
geninitrd/trunk/geninitrd
Log:
Copy device only if it doesn't exist.
Modified: geninitrd/trunk/geninitrd
==============================================================================
--- geninitrd/trunk/geninitrd (original)
+++ geninitrd/trunk/geninitrd Sat Jan 27 00:51:58 2007
@@ -1503,7 +1503,7 @@
if [ "$INITRDFS" = "initramfs" ]; then
mkdir -p $MNTIMAGE/newroot
- cp -HR $org_rootdev $MNTIMAGE/dev
+ [ ! -e "$MNTIMAGE/$org_rootdev" ] && cp -HR $org_rootdev $MNTIMAGE/dev
# Parsing root parameter
# We support passing root as hda3 /dev/hda3 0303 0x0303
cat << 'EOF' >> "$s"
@@ -1548,7 +1548,7 @@
fi
EOF
cat << EOF >> "$s"
-mount -t $rootFs -r \$device /newroot
+mount -t $rootFs -r \$device /newroot
init="\$(busybox awk ' /init=\// { gsub(/.*init=/,NIL,\$0); gsub(/
.*/,NIL,\$0); print \$0; } ' /proc/cmdline )"
if [ -z "\$init" -o ! -x "/newroot\$init" ]; then
init=/sbin/init
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit