4 if [ -z "${vdir}" ] ; then
6 echo "Provide the directory of the root filesystem to operate on"
10 # Cleanup yum config entirely, waiting for the config files to populate this
11 rm -rf ${vdir}/etc/yum.conf ${vdir}/etc/yum.repos.d
14 # turn ON openvswitch as it is required for the privatebridge nm plugin
15 chroot ${vdir} systemctl enable openvswitch.service || :
16 # enabling network as it ends up turned off on systems that come with NetworkManager, starting with fedora9
17 chroot ${vdir} systemctl enable network.service || :
18 # and turn off NetworkManager if present, as it quite obviously messes with network
19 chroot ${vdir} systemctl disable NetworkManager.service || :
21 chroot ${vdir} systemctl enable ntpd.service || :
22 # tentatively turn on getty on tty1
23 chroot ${vdir} systemctl enable getty@tty1.service || :
25 # Disable splaying of cron.
26 echo > ${vdir}/etc/sysconfig/crontab
28 # Add site_admin account
29 chroot ${vdir} /usr/sbin/useradd -p "" -u 502 -m site_admin
31 # Add a logrotate script for btmp, which logs failed ssh logins, which can
32 # grow unbounded on public plnodes and fill the root fs.
33 cat <<EOF > ${vdir}/etc/logrotate.d/btmp
44 #################### historical notes - see config.planetlab/nodeimage.post
45 # xxx turning OFF selinux
46 # there used to be some code for that in the historical/vserver version
47 # none of that code seems applicable in f16 any longer
49 # also a horrible hack to the network initscripts has been removed