copied from trunk, should help the aston.uk node with their weird Cisco
authorStephen Soltesz <soltesz@cs.princeton.edu>
Tue, 8 Jul 2008 17:49:57 +0000 (17:49 +0000)
committerStephen Soltesz <soltesz@cs.princeton.edu>
Tue, 8 Jul 2008 17:49:57 +0000 (17:49 +0000)
router.

config.planetlab/bootstrapfs.post

index d35618c..c2535bd 100644 (file)
@@ -18,6 +18,10 @@ echo > ${vdir}/etc/sysconfig/crontab
 # Add site_admin account
 chroot ${vdir} /usr/sbin/useradd -p "" -u 502 -m site_admin
 
+# NOTE: this is added to ensure that processes running within the slices that
+# may have special permissions and other parts of the filesystem engated are
+# killed before shutdown.  We experienced hangs when rebooting without this
+# step.
 ( cat <<EOF ) | patch -d ${vdir}/etc/init.d/
 --- halt        2007-10-08 19:18:54.000000000 +0000
 +++ halt2       2008-05-07 17:52:42.000000000 +0000
@@ -33,3 +37,25 @@ chroot ${vdir} /usr/sbin/useradd -p "" -u 502 -m site_admin
 
  # Write to wtmp file before unmounting /var
 EOF
+
+# NOTE:  This is added to relieve one site's Cisco router configuration that
+# fails to recognize the host once the arping is sent out.
+cat <<\EOF | patch -d ${vdir}/etc/sysconfig/network-scripts/
+--- ifup-eth   2008-07-08 13:19:49.000000000 -0400
++++ ifup-eth-orig      2008-07-08 13:20:02.000000000 -0400
+@@ -263,10 +263,10 @@
+     fi
+     
+     if ! LC_ALL=C ip addr ls ${REALDEVICE} | LC_ALL=C grep -q "${IPADDR}/${PREFIX}" ; then
+-       if ! arping -q -c 2 -w 3 -D -I ${REALDEVICE} ${IPADDR} ; then
+-          echo $"Error, some other host already uses address ${IPADDR}."
+-          exit 1
+-       fi
++       #if ! arping -q -c 2 -w 3 -D -I ${REALDEVICE} ${IPADDR} ; then
++       #   echo $"Error, some other host already uses address ${IPADDR}."
++       #   exit 1
++       #fi
+        if ! ip addr add ${IPADDR}/${PREFIX} \
+           brd ${BROADCAST:-+} dev ${REALDEVICE} ${SCOPE} label ${DEVICE}; then
+           echo $"Error adding address ${IPADDR} for ${DEVICE}."
+EOF