#! /bin/sh
if [ -h /tmp ]; then
    rm -f /tmp
    mkdir /tmp
fi

for i in /tmp /var/run /var/lock
do
    echo "Mounting tmpfs on $i"
    ls $i
    mount -n -t tmpfs none $i
done
chown root.root /tmp /var/run /var/lock
chmod 1777 /tmp
chmod 755 /var/lock /var/run
