PLEASE READ: This howto is a work in progress. Use at your own risk!
Upstart on openSUSE Howto
This guide is based on openSUSE 10.3 alpha 2 and Upstart 0.3.8. If you run into problems consult the Debugging page for help. The trick of switching init to /bin/sh should be helpful if you run into booting problems.
Download Upstart and the example jobs from the download page.
Follow the initial instructions on the Getting Started page.
Configure Upstart with the prefix=/opt/upstart command. This does not replace the existing init.
- Execute "make" and "make install"
- Untar the example jobs in the /etc/event.d directory. Upstart scans all files in /etc/event.d. Remember to remove the examples tar file from /etc/event.d.
Add a new alternative kernel configuration line to /boot/grub/menu.lst. Copy the four lines that represent the default kernel configuration. Modify the kernel line to include:
We have configured and compiled Upstart with the prefix=/opt/upstart command in this Howto. All Upstart commands are located in /opt/upstart/sbin. To reference the correct commands we have to add /opt/upstart/sbin to our path.
In the /etc/event.d directory execute the following command: perl -pi -e 'undef $/; s/script\n/script\n export PATH=\/opt\/upstart\/sbin:\$PATH\n/' rc* OR Add export PATH=/opt/upstart/sbin:$PATH to each rc file immediately after the beginning of the script block by hand
openSUSE requires execution of /etc/init.d/boot early in the boot phase. Also, openSUSE does not have a /etc/init.d/rcS script, instead it uses the same /etc/init.d/rc script as other runlevels. For these reasons, modify /etc/event.d/rcS:
script export PATH=/opt/upstart/sbin:$PATH # <-- ALREADY ADDED FROM PREVIOUS STEP exec /etc/init.d/boot # <-- ADD THIS LINE runlevel --set S >/dev/null || true : : exec /etc/init.d/rc S" # ADD A SPACE BETWEEN rc and S
openSUSE uses /sbin/mingetty, not /sbin/getty as the example jobs do. We have to substitute each getty reference to the correct openSUSE mingetty. In the /etc/event.d directory execute the following command:
perl -pi -e 's/getty 38400/mingetty/' tty*
The /etc/event.d/control-alt-delete job definition file references the default shutdown command. That is the incorrect command. Modify /etc/event.d/control-alt-delete:
start on control-alt-delete script export PATH=/opt/upstart/sbin:$PATH # <-- ADD THIS LINE exec shutdown -r now "Control-Alt-Delete pressed" # REMOVE /sbin/ FROM THIS LINE end script
- Modify the path to include "/opt/upstart/sbin" first. This will make sure that you execute the Upstart versions of system commands like reboot, telinit, etc.