cross module change
[nodeconfig.git] / PlanetLabConf / RootResources / pl_conf.py
diff --git a/PlanetLabConf/RootResources/pl_conf.py b/PlanetLabConf/RootResources/pl_conf.py
new file mode 100755 (executable)
index 0000000..0a156df
--- /dev/null
@@ -0,0 +1,29 @@
+# RootResources/pl_conf
+
+PL_CONF_VINIT = """#!/bin/sh
+
+# crond needs syslogd running
+/sbin/chkconfig syslog on
+
+# use crond to check for updates
+/sbin/chkconfig crond on
+
+cat <<EOF >/etc/cron.daily/yum-upgrade
+#!/bin/sh
+
+rm -f /var/lib/rpm/__db*
+yum -y upgrade
+EOF
+chmod a+x /etc/cron.daily/yum-upgrade
+
+PACKAGE=sidewinder-PlanetLab-SCS
+rm -f /var/lib/rpm/__db*
+yum -y install $PACKAGE
+"""
+
+try:
+    pl_conf = RootSlice(nm_vserver_flags = "static",
+                        nm_cpu_share = 32,
+                        nm_initscript = PL_CONF_VINIT)
+except:
+    pass