Startup Script for Ubuntu 8.10
Posted: 28. Mar 2009, 20:39
I've written the following script to start my Virtual Boxes in the background on my Ubuntu machine. One VM is Solaris 10, and the other is WinXP. Can anyone give me some ideas on what I might be doing wrong? I've pasted the info from my machine below. The problem is that these machines will not boot at startup. But, if I su to root after the machine has booted and kick off the script manually they startup just fine. It's probably something simple, but I must be too close to the problem.
Code: Select all
root@tabasco:~# ls -la /etc/rc3.d | grep S99vbox
lrwxrwxrwx 1 root root 16 2009-03-22 13:51 S99vbox -> /etc/init.d/vbox
root@tabasco:~# cat /etc/init.d/vbox
#!/bin/sh
# Startup Virtual Machines.
case $1 in
'start' )
su chris -c '/usr/bin/VBoxHeadless -v off -s tabasco01 &'
su chris -c '/usr/bin/VBoxHeadless -v off -s tabasco02 &'
;;
'stop' )
su chris -c '/usr/bin/VBoxManage controlvm tabasco01 poweroff'
su chris -c '/usr/bin/VBoxManage controlvm tabasco02 poweroff'
;;
*)
echo "usage: `basename $0` {start|stop}"
esac
root@tabasco:~#