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 "in slice image: resetting root password"
13 sed -i -e "s/root:[\*|x]/root:/" ${vdir}/etc/passwd
15 # modify the sudoers file to remove the 'requiretty' attribute
16 echo "in slice image: removing requiretty from /etc/sudoers"
17 sed -i -e 's,^\(Defaults.*requiretty\),#\1,' ${vdir}/etc/sudoers
19 # Fix up /etc/init.d/halt
20 echo "in slice image: fixing /etc/init.d/halt"
21 cat > ${vdir}/etc/init.d/halt <<EOF
23 exec /sbin/killall5 -15