Updated June 25, 2003
Created June 25, 2003
Autogenerated Site Map
Search this Site!:
##
## This the linux way of doing a runonce:
##
cp -a /etc/rc.d/rc.local /etc/rc.d/rc.local.sav
cat <<EOF>>/etc/rc.d/rc.local
/runonce.sh
EOF
cat <<EOF>/runonce.sh
#!/bin/sh
# First some required cleanup for runonce
mv -f /etc/rc.d/rc.local.sav /etc/rc.d/rc.local
# Lets do stuff only 1 time here
# place your runonce code here
# reboot here if you want to reboot right after runonce
EOF
chmod +x /runonce.sh
I haven't run this yet, so if anyone has any fixes for it I would appreciate feedback.
Sincerely,
Richard Black
Search this Site!:
Homepage: http://www.cpqlinux.com
Site Map: http://www.cpqlinux.com/sitemap.html