Debugging init scripts.
Paul Schulz
paul at mawsonlakes.org
Fri Nov 27 13:15:43 UTC 2009
Hi Jarl,
Have a look into the 'upstart' scripts, located in /etc/init for
examples of new upstart configuration scripts.
see: http://upstart.ubuntu.com/wiki/
On Fri, Nov 27, 2009 at 11:21 PM, Jarl Friis <jarl at gavia.dk> wrote:
> Hi. I am using Karmic Koala
>
> I have written some innit scripts to start and stop some virtual
> machines.
>
> The top of the file looks like this.
> #!/bin/sh
> #
> # Init script for one libvirtd domain
> #
> # (c) 2009 Jarl Friis <jarl at gavia.dk>
> # based on http://www.linux-kvm.com/content/stop-script-running-vms-using-virsh#comment-511
> #
> ### BEGIN INIT INFO
> # Provides: kvm-rcs-poseidon
> # Required-Start: $kvm $qemu-kvm $libvirtd
> # Required-Stop: $kvm $qemu-kvm $libvirtd
> # Default-Start: 2 3 4 5
> # Default-Stop: 0 1 6
> # Short-Description: Starting/Saving, Stopping/Restoring kvm-rcs-<VIRSH DOMAIN> KVM guest.
> # Description: Starting/Saving, Stopping/Restoring KVM guest.
> ### END INIT INFO#
>
> I can send the whole file if you are interested.
>
> I have put in into /etc/init.d/ and the run update-rc.d apropriately,
> so I have
>
> $ ls -l /etc/rc*.d/*kvm-rcs-poseidon*
> lrwxrwxrwx 1 root root 26 2009-11-27 12:18 /etc/rc0.d/K19kvm-rcs-poseidon -> ../init.d/kvm-rcs-poseidon
> lrwxrwxrwx 1 root root 26 2009-11-27 12:18 /etc/rc1.d/K19kvm-rcs-poseidon -> ../init.d/kvm-rcs-poseidon
> lrwxrwxrwx 1 root root 26 2009-11-27 12:18 /etc/rc2.d/S21kvm-rcs-poseidon -> ../init.d/kvm-rcs-poseidon
> lrwxrwxrwx 1 root root 26 2009-11-27 12:18 /etc/rc3.d/S21kvm-rcs-poseidon -> ../init.d/kvm-rcs-poseidon
> lrwxrwxrwx 1 root root 26 2009-11-27 12:18 /etc/rc4.d/S21kvm-rcs-poseidon -> ../init.d/kvm-rcs-poseidon
> lrwxrwxrwx 1 root root 26 2009-11-27 12:18 /etc/rc5.d/S21kvm-rcs-poseidon -> ../init.d/kvm-rcs-poseidon
> lrwxrwxrwx 1 root root 26 2009-11-27 12:18 /etc/rc6.d/K19kvm-rcs-poseidon -> ../init.d/kvm-rcs-poseidon
>
> However the scripts does not seem to run at boot. How can I debug to
> figure out what is going on.
>
> There seems to be a problem that prevents logging of startup activity,
> hence I can see no trace of problem in this script.
>
> What is the best approach forward to find the problem?
>
> Jarl
>
>
> --
> ubuntu-server mailing list
> ubuntu-server at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
> More info: https://wiki.ubuntu.com/ServerTeam
>
More information about the ubuntu-server
mailing list