bootdisk: installer-dest (HEAD) [malekith]

PLD CVS pld-cvs-commit w pld.org.pl
Pią, 26 Lip 2002, 12:43:57 CEST


Module name:	bootdisk
Changes by:	malekith	02/07/26 12:43:55

Modified files:
	installer-dest

Log message:
- append tail of removed to new one
- unmount and swapoff always, not only if /dest/etc/fstab exists
- chmod 600 /var/log/installer

Index: installer-dest
===================================================================
RCS file: /cvsroot/bootdisk/batch-installer/installer-dest,v
diff -d -u -r1.57 -r1.58
--- installer-dest	2002/04/06 10:59:54	1.57
+++ installer-dest	2002/07/26 10:43:54	1.58
@@ -429,7 +429,17 @@
 # first unmount all the destination if they were already mounted
 # useful for developers that run this script multiple times
 # hmm, busybox does not have swapon -s
-if test -f /dest/etc/fstab; then 
+if test "x$dry_run" = "xno"; then
+    if test -L /var/log/installer ; then
+      if test -r ; then
+        tail -n 500 /var/log/installer > /var/log/installer.tmp
+      else
+        echo -n > /var/log/installer.tmp
+      fi
+      rm -f /var/log/installer
+      mv /var/log/installer.tmp /var/log/installer
+    fi
+    
     cat /proc/swaps | grep '^/' \
 	| while read dev rest; do 
 	    log debug "Turning off $dev"
@@ -453,8 +463,6 @@
 	fi
       done
     fi
-    # remove link to log
-    rm -f /var/log/installer
 fi
 
 # iterate through devices
@@ -692,6 +700,8 @@
 	test -d /dest/var/log || mkdir -p /dest/var/log
 	mv /var/log/installer /dest/var/log/
 	ln -s /dest/var/log/installer /var/log/installer
+	# just in case...
+	chmod 600 /dest/var/log/installer
     fi
 fi
 



Więcej informacji o liście dyskusyjnej pld-installer