5 if [ -z "${vdir}" ] ; then
7 echo "Provide the directory of the root filesystem to operate on"
11 # reset root password to be empty
12 echo "Resetting root password in vserver-reference image"
13 sed -i -e "s/root:[\*|x]/root:/" ${vdir}/etc/passwd
15 # modify the sudoers file to remove the 'requiretty' attribute
16 echo "Removing requiretty from default /etc/sudoers file"
17 sed -i -e 's,^\(Defaults.*requiretty\),#\1,' ${vdir}/etc/sudoers
19 # Fix up /etc/init.d/halt
20 echo "Fixing /etc/init.d/halt in vserver-reference image"
21 cat > ${vdir}/etc/init.d/halt <<EOF
23 exec /sbin/killall5 -15