#!/bin/bash vdir=$1 if [ -z "${vdir}" ] ; then echo "ERROR: $0" echo "Provide the directory of the root filesystem to operate on" exit fi # Remove unneeded services for service in util-vserver vprocunhide vservers-default; do chroot ${vdir} /sbin/chkconfig $service off done # Disable splaying of cron. echo > ${vdir}/etc/sysconfig/crontab # sss # update /etc/sysconfig/network-scripts/ifup # #if ! arping -q -c 2 -w 3 -D -I ${REALDEVICE} ${IPADDR} ; then #echo $"Error, some other host already uses address ${IPADDR}." #exit 1 #fi # 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 <