I have following lines in my rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
if [ -f /resize ]
then
if [ -f /resize2 ]
then
sh /resize2
else
sh /resize
fi
fi
/etc/rc --foreground
/sbin/iptables-restore /etc/iptables
mkdir /tmp/cooks
mkdir /tmp/cook
chmod 777 /tmp/cook
chmod 777 /tmp/cooks
mkdir /tmp/xhprof
chmod 777 /tmp/xhprof
exit 0
but neither /tmp/cooks
nor /tmp/cook
nor /tmp/xhprof
dir was not created (on system startup).
I'm using Debian GNU/Linux 6.0 squeeze (VPS)
#!/bin/sh
line at the top. I notice Debian has#!/bin/sh -e
by default and no/etc/rc
, so the first line would fail and the script would exit. Is that what's happening?