(no commit message)
authorMarc Fiuczynski <mef@cs.princeton.edu>
Thu, 16 Jul 2009 03:29:50 +0000 (03:29 +0000)
committerMarc Fiuczynski <mef@cs.princeton.edu>
Thu, 16 Jul 2009 03:29:50 +0000 (03:29 +0000)
config.coblitz/bootstrapfs.pkgs [new file with mode: 0644]
config.coblitz/bootstrapfs.pos [new file with mode: 0644]

diff --git a/config.coblitz/bootstrapfs.pkgs b/config.coblitz/bootstrapfs.pkgs
new file mode 100644 (file)
index 0000000..591b45e
--- /dev/null
@@ -0,0 +1,123 @@
+# Keeping the old name as it might be referenced elsewhere (node update..)
+# groupname: Bootstrapfs
+groupname: PlanetLab
+groupdesc: PlanetLab Node Root
+# packages to exclude from stock repositories
+kexclude: @KEXCLUDE@
+# fedora-release or centos-release are pulled from deps
+# define packages
+package: kernel
+package: udev
+package: basesystem
+package: filesystem
+package: bash
+package: coreutils
+package: python
+package: cpio
+package: e2fsprogs
+package: ed
+package: file     
+package: glibc
+package: hdparm
+package: initscripts
+package: iproute
+package: iputils
+package: kbd
+package: passwd
+package: procps
+package: readline
+package: rootfiles
+package: rpm
+package: setserial
+package: setup
+package: vim-minimal
+package: shadow-utils
+package: anacron
+package: at
+package: authconfig
+package: bc
+package: bind-utils
+package: bzip2
+package: crontabs
+package: dhclient
+package: diffutils
+package: ethtool
+package: logrotate
+package: libnl
+package: lsof
+package: mailcap
+package: nano
+package: nc
+package: openssh-clients
+package: parted
+package: pciutils
+package: psacct
+package: quota
+package: rsh
+package: rsync
+package: sendmail
+package: sudo
+package: telnet
+package: traceroute
+package: time
+package: tmpwatch
+package: tcpdump
+package: openssh-server
+package: wget
+package: yum
+package: curl
+package: gzip
+package: iptables
+package: mkinitrd
+package: ntp
+package: perl
+package: python
+package: tar
+package: expect
+package: nfs-utils
+package: openvpn
+package: vconfig
+package: PyXML
+
+package: termcap libtermcap
+package: vixie-cron
+
+#
+# platform-dependent
+#
+package: rsyslog
+package-centos5: rsyslog
+package+centos5: sysklogd
+
+package: util-linux-ng
+package-centos5: util-linux-ng
+package+centos5: util-linux
+
+package-f10: termcap libtermcap
+package-f10: vixie-cron
+#
+# planetlab
+#
+package: madwifi
+package: wireless-tools
+package: util-vserver
+package: util-vserver-build
+package: util-vserver-lib
+package: util-vserver-core
+package: util-vserver-sysv
+package: util-vserver-legacy
+package: util-vserver-pl
+#package: util-python
+package: NodeManager
+package: NodeUpdate
+package: codemux
+package: pl_sshd
+package: ipod
+package: vserver-@pldistro@-@fcdistro@-@arch@
+package: vserver-systemslices-@pldistro@-@fcdistro@-@arch@
+package: pl_mom
+package: fprobe-ulog
+package: vsys
+package: vsys-scripts
+package: monitor-client
+package: monitor-runlevelagent
diff --git a/config.coblitz/bootstrapfs.pos b/config.coblitz/bootstrapfs.pos
new file mode 100644 (file)
index 0000000..dd6b93e
--- /dev/null
@@ -0,0 +1,71 @@
+#!/bin/bash
+
+vdir=$1
+if [ -z "${vdir}" ] ; then
+       echo "ERROR: $0"
+       echo "Provide the directory of the root filesystem to operate on"
+       exit
+fi
+
+# NOTE: we're enabling util-vserver to allow it to help shutdown all slices
+# before rebooting.  This has been problematic in the past.
+# Thierry : I'm enabling network since, for some reason, it ends up turned off on fedora9
+for service in network util-vserver; do
+    chroot ${vdir} /sbin/chkconfig $service on
+done
+
+# Remove unneeded services
+for service in vprocunhide vservers-default; do
+    chroot ${vdir} /sbin/chkconfig $service off
+done
+
+# Disable splaying of cron.
+echo > ${vdir}/etc/sysconfig/crontab
+
+# Add site_admin account
+chroot ${vdir} /usr/sbin/useradd -p "" -u 502 -m site_admin
+
+# NOTE:  Removed due to incompatibility between fedora and centos, and b/c we
+# expect that enabling util-vserver above will help with shutdown.
+#
+# : 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
+#@@ -65,8 +65,10 @@
+# # Kill all processes.
+# [ "\${BASH+bash}" = bash ] && enable kill
+#
+#+action $"Sending all VServers the TERM signal..."  ls -d /proc/virtual/[0-9]* | awk -F '/' '{print \$4}' | xargs -I{} /usr/sbin/vkill -s 15 --xid {} -- 0
+# action $"Sending all processes the TERM signal..." /sbin/killall5 -15
+# sleep 2
+#+action $"Sending all VServers the KILL signal..."  ls -d /proc/virtual/[0-9]* | awk -F '/' '{print \$4}' | xargs -I{} /usr/sbin/vkill -s 9 --xid {} -- 0
+# action $"Sending all processes the KILL signal..."  /sbin/killall5 -9
+#
+# # 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