# become root
sudo bash

# edit file
vim /etc/rc.common

# this is how the end of the file looks like
# hit Ctrl+G to jump to the bottom of the file

##
# Generic action handler
##
RunService ()
{
    case $1 in
      start  ) StartService   ;;
      stop   ) StopService    ;;
      restart) RestartService ;;
      *      ) echo "$0: unknown argument: $1";;
    esac
}

# put your commands here
# reload virtualbox kernel drivers
/Library/StartupItems/VirtualBox/VirtualBox restart

# this proofs that the script is executed
echo "this is executed on startup" > /test.txt

##########################
# Get host configuration #
##########################
. /etc/hostconfig

liked this article?

  • only together we can create a truly free world
  • plz support dwaves to keep it up & running!
  • (yes the info on the internet is (mostly) free but beer is still not free (still have to work on that))
  • really really hate advertisement
  • contribute: whenever a solution was found, blog about it for others to find!
  • talk about, recommend & link to this blog and articles
  • thanks to all who contribute!
admin