[Fai-commit] r5925 - trunk/lib

Thomas Lange lange at alioth.debian.org
Sat Jul 31 20:54:46 UTC 2010


Author: lange
Date: 2010-07-31 20:54:46 +0000 (Sat, 31 Jul 2010)
New Revision: 5925

Modified:
   trunk/lib/subroutines
   trunk/lib/updatebase
Log:
minor code update


Modified: trunk/lib/subroutines
===================================================================
--- trunk/lib/subroutines	2010-07-31 16:34:30 UTC (rev 5924)
+++ trunk/lib/subroutines	2010-07-31 20:54:46 UTC (rev 5925)
@@ -918,10 +918,10 @@
 
     if [ $do_init_tasks -eq 1 ] ; then
 	# show some local information
-	ip -s link show up; df -T
+	df -T
+	ip addr show up
 	# show rx and tx bytes of network device
 	grep . /sys/class/net/*/statistics/*x_bytes | perl -ane 'm#/sys/class/net/(.+)/statistics/(.+):(\d+)# && ($3) && ($1 ne lo) && printf "%s %s %.2f Mbytes\n",$1,$2,$3/1000000 '
-	# umount swap space
 	swapoff -a
     fi
 

Modified: trunk/lib/updatebase
===================================================================
--- trunk/lib/updatebase	2010-07-31 16:34:30 UTC (rev 5924)
+++ trunk/lib/updatebase	2010-07-31 20:54:46 UTC (rev 5925)
@@ -2,6 +2,11 @@
 
 # $Id$
 
+# this script is called after the base.tgz is extract
+# update packages (from base.tgz) to their newest version
+# is almost Debian specific
+
+# first setup the environment in /target
 if [ "$FAI_ACTION" = "install" -o "$FAI_ACTION" = "dirinstall" ]; then
     # some packages must access /proc even in chroot environment
     mount -t proc proc $FAI_ROOT/proc
@@ -12,8 +17,8 @@
     mount -t devpts devpts $FAI_ROOT/dev/pts
     # if libc is upgraded init u is called in chroot environment and
     # then init will eat up much cpu time
+    # fake some more programs
     fai-divert -a /sbin/init /usr/sbin/liloconfig /usr/sbin/invoke-rc.d
-    # fake some more programs
     fai-divert -a /etc/init.d/nis /usr/sbin/policy-rc.d
     # never start any daemons inside chroot during installtion
     cat > $FAI_ROOT/usr/sbin/policy-rc.d <<EOF
@@ -23,8 +28,6 @@
     chmod a+rx $FAI_ROOT/usr/sbin/policy-rc.d
 fi
 
-# update the apt-get information inside the nfsroot 
-
 export aptopt='-y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold"'
 $ROOTCMD apt-get $aptopt update
 $ROOTCMD apt-get $aptopt check
@@ -33,8 +36,6 @@
 [ $? -ne 0 ] && yes '' | $ROOTCMD dpkg --configure -a 
 # using the above value, causes an error: "dpkg need action"
 export aptopt=
-$ROOTCMD aptitude -y safe-upgrade
-
 $ROOTCMD aptitude $aptopt -f -y full-upgrade </dev/null
 # update dpkg info which packages are available
 tmp=$($ROOTCMD mktemp) || exit 88




More information about the Fai-commit mailing list