Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Arjan Bouter (79ac26ba6ca3bfe6bb456882abb0a9b91874d62b)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Arjan Bouter <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Arjan Bouter (79ac26ba6ca3bfe6bb456882abb0a9b91874d62b)
  • Date: Thu, 31 Mar 2011 15:41:26 -0500

GIT changes to master grimoire by Arjan Bouter <abouter AT sourcemage.org>:

smgl/smgl-upstart/CONFIGURE |
4
smgl/smgl-upstart/DEPENDS |
2
smgl/smgl-upstart/DETAILS |
2
smgl/smgl-upstart/HISTORY |
4
smgl/smgl-upstart/INSTALL |
4
smgl/smgl-upstart/inittab |
14 +
smgl/smgl-upstart/inittab.native |
14 -
smgl/smgl-upstart/inittab.sysvcompat |
17 -
smgl/smgl-upstart/upstart-init/README |
53 ++++
smgl/smgl-upstart/upstart-init/acpid.conf |
13 +
smgl/smgl-upstart/upstart-init/alsa-stop.conf |
19 +
smgl/smgl-upstart/upstart-init/alsa.conf |
23 +
smgl/smgl-upstart/upstart-init/avahi.conf |
17 +
smgl/smgl-upstart/upstart-init/avahi.override |
1
smgl/smgl-upstart/upstart-init/clamav.conf |
13 +
smgl/smgl-upstart/upstart-init/control-alt-delete.conf |
14 +
smgl/smgl-upstart/upstart-init/dbus.conf |
20 +
smgl/smgl-upstart/upstart-init/devices.conf |
22 +
smgl/smgl-upstart/upstart-init/displaymanager.conf |
14 +
smgl/smgl-upstart/upstart-init/freshclam.conf |
13 +
smgl/smgl-upstart/upstart-init/hald.conf |
14 +
smgl/smgl-upstart/upstart-init/hostname.conf |
12 +
smgl/smgl-upstart/upstart-init/ifupdown.conf |
26 ++
smgl/smgl-upstart/upstart-init/libvirtd.conf |
18 +
smgl/smgl-upstart/upstart-init/lighttpd.conf |
13 +
smgl/smgl-upstart/upstart-init/lighttpd.override |
1
smgl/smgl-upstart/upstart-init/mariadb.conf |
41 +++
smgl/smgl-upstart/upstart-init/mariadb.override |
1
smgl/smgl-upstart/upstart-init/mcelog.conf |
13 +
smgl/smgl-upstart/upstart-init/metalog.conf |
19 +
smgl/smgl-upstart/upstart-init/mount_local.conf |
14 +
smgl/smgl-upstart/upstart-init/mount_remote.conf |
17 +
smgl/smgl-upstart/upstart-init/mount_root.conf |
15 +
smgl/smgl-upstart/upstart-init/mpd.conf |
13 +
smgl/smgl-upstart/upstart-init/native/README |
28 --
smgl/smgl-upstart/upstart-init/native/alsa.conf |
27 --
smgl/smgl-upstart/upstart-init/native/avahi.conf |
11
smgl/smgl-upstart/upstart-init/native/clamav |
13 -
smgl/smgl-upstart/upstart-init/native/control-alt-delete.conf |
12 -
smgl/smgl-upstart/upstart-init/native/dbus.conf |
22 -
smgl/smgl-upstart/upstart-init/native/devices.conf |
37 ---
smgl/smgl-upstart/upstart-init/native/freshclam |
11
smgl/smgl-upstart/upstart-init/native/gdm.conf |
11
smgl/smgl-upstart/upstart-init/native/hald.conf |
16 -
smgl/smgl-upstart/upstart-init/native/hostname.conf |
13 -
smgl/smgl-upstart/upstart-init/native/libvirtd.conf |
15 -
smgl/smgl-upstart/upstart-init/native/lighttpd.conf |
11
smgl/smgl-upstart/upstart-init/native/mount_all.conf |
119 ----------
smgl/smgl-upstart/upstart-init/native/mount_root.conf |
88 -------
smgl/smgl-upstart/upstart-init/native/mpd.conf |
16 -
smgl/smgl-upstart/upstart-init/native/network.conf |
26 --
smgl/smgl-upstart/upstart-init/native/shorewall.conf |
34 --
smgl/smgl-upstart/upstart-init/native/shutdown.conf |
29 --
smgl/smgl-upstart/upstart-init/native/slapd.conf |
14 -
smgl/smgl-upstart/upstart-init/native/sulogin.conf |
18 -
smgl/smgl-upstart/upstart-init/native/syslog.conf |
21 -
smgl/smgl-upstart/upstart-init/native/tty1.conf |
15 -
smgl/smgl-upstart/upstart-init/native/tty2.conf |
14 -
smgl/smgl-upstart/upstart-init/native/tty3.conf |
14 -
smgl/smgl-upstart/upstart-init/native/xend.conf |
25 --
smgl/smgl-upstart/upstart-init/native/xinetd.conf |
11
smgl/smgl-upstart/upstart-init/postgresql.conf |
29 ++
smgl/smgl-upstart/upstart-init/postgresql.override |
1
smgl/smgl-upstart/upstart-init/scripts/mount_local.sh |
95 +++++++
smgl/smgl-upstart/upstart-init/scripts/mount_root.sh |
88 +++++++
smgl/smgl-upstart/upstart-init/shorewall.conf |
35 ++
smgl/smgl-upstart/upstart-init/shorewall6.conf |
35 ++
smgl/smgl-upstart/upstart-init/shutdown.conf |
34 ++
smgl/smgl-upstart/upstart-init/slapd.conf |
16 +
smgl/smgl-upstart/upstart-init/slapd.override |
1
smgl/smgl-upstart/upstart-init/snort.conf |
13 +
smgl/smgl-upstart/upstart-init/snort.override |
1
smgl/smgl-upstart/upstart-init/sshd.conf |
13 +
smgl/smgl-upstart/upstart-init/sulogin.conf |
19 +
smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/control-alt-delete |
8
smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/rc-default |
23 -
smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/rc0 |
25 --
smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/rc1 |
19 -
smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/rc2 |
20 -
smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/rc3 |
20 -
smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/rc4 |
20 -
smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/rc5 |
20 -
smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/rc6 |
23 -
smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/rcS |
24 --
smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/rcS-sulogin |
25 --
smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/sulogin |
18 -
smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/tty1 |
16 -
smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/tty2 |
16 -
smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/tty3 |
16 -
smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/tty4 |
16 -
smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/tty5 |
16 -
smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/tty6 |
16 -
smgl/smgl-upstart/upstart-init/tty1.conf |
15 +
smgl/smgl-upstart/upstart-init/tty2.conf |
14 +
smgl/smgl-upstart/upstart-init/tty3.conf |
14 +
smgl/smgl-upstart/upstart-init/udev.conf |
33 ++
smgl/smgl-upstart/upstart-init/watchdog.conf |
13 +
smgl/smgl-upstart/upstart-init/xend.conf |
23 +
smgl/smgl-upstart/upstart-init/xinetd.conf |
13 +
smgl/smgl-upstart/upstart-init/xinetd.override |
1
100 files changed, 967 insertions(+), 1051 deletions(-)

New commits:
commit 79ac26ba6ca3bfe6bb456882abb0a9b91874d62b
Author: Arjan Bouter <abouter AT sourcemage.org>
Commit: Arjan Bouter <abouter AT sourcemage.org>

smgl-upstart: dropped sysv-compat mode and revised init scripts

diff --git a/smgl/smgl-upstart/CONFIGURE b/smgl/smgl-upstart/CONFIGURE
deleted file mode 100755
index 9b0c7d3..0000000
--- a/smgl/smgl-upstart/CONFIGURE
+++ /dev/null
@@ -1,4 +0,0 @@
-message "sysvcompat, copied from ubuntu is currently broken on SMGL" &&
-message "native is created from scratch for Source Mage GNU/Linux" &&
-message "so use native unless you feel like fixing sysvcompat" &&
-config_query_list UPSTART_INIT "Choose upstart init-mode mode:" native
sysvcompat
diff --git a/smgl/smgl-upstart/DEPENDS b/smgl/smgl-upstart/DEPENDS
index 41a516f..1361d5f 100755
--- a/smgl/smgl-upstart/DEPENDS
+++ b/smgl/smgl-upstart/DEPENDS
@@ -1,2 +1,2 @@
depends upstart &&
-depends GETTY
+depends util-linux
diff --git a/smgl/smgl-upstart/DETAILS b/smgl/smgl-upstart/DETAILS
index 1b65f57..511d5de 100755
--- a/smgl/smgl-upstart/DETAILS
+++ b/smgl/smgl-upstart/DETAILS
@@ -1,5 +1,5 @@
SPELL=smgl-upstart
- VERSION=0.1
+ VERSION=0.2
WEB_SITE=http://www.sourcemage.org
ENTERED=20090907
LICENSE[0]=GPL
diff --git a/smgl/smgl-upstart/HISTORY b/smgl/smgl-upstart/HISTORY
index 6c3aa1f..e2c2cb4 100644
--- a/smgl/smgl-upstart/HISTORY
+++ b/smgl/smgl-upstart/HISTORY
@@ -1,3 +1,7 @@
+2011-03-31 Arjan Bouter <abouter AT sourcemage.org>
+ * dropped sysv-compat support
+ * added revised native init scripts
+
2009-09-15 Arjan Bouter <abouter AT sourcemage.org>
* improved the native init scripts

diff --git a/smgl/smgl-upstart/INSTALL b/smgl/smgl-upstart/INSTALL
index d4ff75a..d92e2d0 100755
--- a/smgl/smgl-upstart/INSTALL
+++ b/smgl/smgl-upstart/INSTALL
@@ -1,4 +1,4 @@
UPSTART_DIR="${INSTALL_ROOT}/etc/init" &&
mkdir -p ${UPSTART_DIR} &&
-cp -r ${SCRIPT_DIRECTORY}/upstart-init/${UPSTART_INIT}/* ${UPSTART_DIR} &&
-install_config_file ${SCRIPT_DIRECTORY}/inittab.${UPSTART_INIT}
${INSTALL_ROOT}/etc/inittab
+cp -r ${SCRIPT_DIRECTORY}/upstart-init/* ${UPSTART_DIR} &&
+install_config_file ${SCRIPT_DIRECTORY}/inittab ${INSTALL_ROOT}/etc/inittab
diff --git a/smgl/smgl-upstart/inittab b/smgl/smgl-upstart/inittab
new file mode 100644
index 0000000..ccb906e
--- /dev/null
+++ b/smgl/smgl-upstart/inittab
@@ -0,0 +1,14 @@
+#bootprog = rc
+# change this to switch to your own upstart init-scripts
+fileprefix = /etc/init
+PATH = /sbin:/bin:/usr/sbin:/usr/bin
+#INIT_PATH =
+
+tty1:linux:/sbin/agetty /dev/tty1 9600
+tty2:linux:/sbin/agetty /dev/tty2 9600
+tty3:linux:/sbin/agetty /dev/tty3 9600
+
+finalprog =
+quietrollback = yes
+#ctrlaltdel = /bin/sh -c "PATH=$INIT_ROOT:$PATH; echo $'\\a\\nAuf
Wiedersehen!\\n' ; initctl -u -r -f"
+ctrlaltdel =/sbin/shutdown -r now
diff --git a/smgl/smgl-upstart/inittab.native
b/smgl/smgl-upstart/inittab.native
deleted file mode 100644
index ccb906e..0000000
--- a/smgl/smgl-upstart/inittab.native
+++ /dev/null
@@ -1,14 +0,0 @@
-#bootprog = rc
-# change this to switch to your own upstart init-scripts
-fileprefix = /etc/init
-PATH = /sbin:/bin:/usr/sbin:/usr/bin
-#INIT_PATH =
-
-tty1:linux:/sbin/agetty /dev/tty1 9600
-tty2:linux:/sbin/agetty /dev/tty2 9600
-tty3:linux:/sbin/agetty /dev/tty3 9600
-
-finalprog =
-quietrollback = yes
-#ctrlaltdel = /bin/sh -c "PATH=$INIT_ROOT:$PATH; echo $'\\a\\nAuf
Wiedersehen!\\n' ; initctl -u -r -f"
-ctrlaltdel =/sbin/shutdown -r now
diff --git a/smgl/smgl-upstart/inittab.sysvcompat
b/smgl/smgl-upstart/inittab.sysvcompat
deleted file mode 100644
index 23b5324..0000000
--- a/smgl/smgl-upstart/inittab.sysvcompat
+++ /dev/null
@@ -1,17 +0,0 @@
-bootprog = rc
-# change this to switch to your own upstart init-scripts
-fileprefix = /etc/init
-PATH = /sbin:/bin:/usr/sbin:/usr/bin
-INIT_PATH = sysvcompat
-
-tty1:linux:/sbin/agetty /dev/tty1 9600
-tty2:linux:/sbin/agetty /dev/tty2 9600
-tty3:linux:/sbin/agetty /dev/tty3 9600
-tty4:linux:/sbin/agetty /dev/tty4 9600
-tty5:linux:/sbin/agetty /dev/tty5 9600
-tty6:linux:/sbin/agetty /dev/tty6 9600
-
-finalprog =
-quietrollback = yes
-#ctrlaltdel = /bin/sh -c "PATH=$INIT_ROOT:$PATH; echo $'\\a\\nAuf
Wiedersehen!\\n' ; initctl -u -r -f"
-ctrlaltdel =/sbin/shutdown -r now
diff --git a/smgl/smgl-upstart/upstart-init/README
b/smgl/smgl-upstart/upstart-init/README
new file mode 100644
index 0000000..42ae758
--- /dev/null
+++ b/smgl/smgl-upstart/upstart-init/README
@@ -0,0 +1,53 @@
+Some useful things to know about upstart on smgl
+
+- The jobs upstart knows about are in the *.conf files,
+ one file per service/daemon/task/job. Any file not ending in .conf
+ is ignored.
+
+- The jobs MAY NOT FAIL, or the entire boot process is halted...
+ Use a script in the scripts dir and a job pointing to it when
+ a job can fail and make sure the script exits cleanly.
+
+- tty{2,3} start as soon as everything is mounted.
+ Annoyingly, GDM (I'm not sure about the others) claims the 1st available
+ tty once it starts, so if tty{2,3} didn't start at that point, they'll
+ try to respawn forever, bothering GDM and ultimately bring down the CPU.
+ So when reordering the scripts, keep in mind that the displaymanager script
+ is started at least a second after tty{2,3}. tty1 is unaffected, as that's
+ started as soon as your / is mounted.
+
+- when writing a job, start on A and ( B or C ) won't work
+ use a separate BorC job and use start on A an BorC in the original job.
+
+feel free to post bugs with additional jobs on
+http://bugs.sourcemage.org and assign them to abouter AT sourcemage.org
+I'll get to them eventually, or just put them in the smgl-upstart spell
+yourself if you have git access ;)
+
+A little info on how to use upstart, because there isn't that much available
+unless you run it in sysvcompat mode...
+
+starting and stopping jobs in upstart:
+
+ start <jobname>
+
+or
+
+ stop <jobname>
+
+where <jobname> is the jobs name in /etc/init without the .conf part.
+
+for example, to start lighty:
+
+ start lighttpd
+
+for a list of jobs and their status:
+
+ initctl list
+
+to emit a signal, in this case to stop everything that depends on network
+connectivity but not the network job itself:
+
+ initctl emit --no-wait network-stop
+
+the --no-wait means "don't wait around to see what is happening.. RUN!!"
diff --git a/smgl/smgl-upstart/upstart-init/acpid.conf
b/smgl/smgl-upstart/upstart-init/acpid.conf
new file mode 100644
index 0000000..2dc5d3b
--- /dev/null
+++ b/smgl/smgl-upstart/upstart-init/acpid.conf
@@ -0,0 +1,13 @@
+# acpid
+#
+# starts acpi daemon
+
+description "Enable acpi daemon"
+author "Arjan Bouter <abouter AT sourcemage.org>"
+
+start on syslog-start
+stop on shutdown
+
+expect fork
+
+exec /usr/sbin/acpid
diff --git a/smgl/smgl-upstart/upstart-init/alsa-stop.conf
b/smgl/smgl-upstart/upstart-init/alsa-stop.conf
new file mode 100644
index 0000000..a0fb188
--- /dev/null
+++ b/smgl/smgl-upstart/upstart-init/alsa-stop.conf
@@ -0,0 +1,19 @@
+# alsa
+#
+# stores alsa settings
+
+description "Store alsa settings"
+author "Arjan Bouter <abouter AT sourcemage.org>"
+
+start on shutdown
+
+task
+
+script
+ [ -e /etc/sysconfig/alsa ] && . /etc/sysconfig/alsa
+ declare -r ASOUNDCFG=/etc/asound.state
+ [[ "$START_ALSA" == no ]] && return 0
+ if [[ -d /proc/asound ]]; then
+ /usr/sbin/alsactl -f $ASOUNDCFG store
+ fi || echo "init: alsa failed to stop"
+end script
diff --git a/smgl/smgl-upstart/upstart-init/alsa.conf
b/smgl/smgl-upstart/upstart-init/alsa.conf
new file mode 100644
index 0000000..6bd9dd0
--- /dev/null
+++ b/smgl/smgl-upstart/upstart-init/alsa.conf
@@ -0,0 +1,23 @@
+# alsa
+#
+# restores alsa settings
+
+description "Restore alsa settings"
+author "Arjan Bouter <abouter AT sourcemage.org>"
+
+start on mounted-localfs
+
+task
+
+script
+ [ -e /etc/sysconfig/alsa ] && . /etc/sysconfig/alsa
+ declare -r ASOUNDCFG=/etc/asound.state
+ [[ "$START_ALSA" == no ]] && return 0
+ if [[ -d /proc/asound ]]; then
+ if ! [[ -r "$ASOUNDCFG" ]]; then
+ echo "No mixer config in $ASOUNDCFG, you have to unmute your
card!"
+ else
+ /usr/sbin/alsactl -f $ASOUNDCFG restore
+ fi
+ fi || echo "init: alsa failed to start"
+end script
diff --git a/smgl/smgl-upstart/upstart-init/avahi.conf
b/smgl/smgl-upstart/upstart-init/avahi.conf
new file mode 100644
index 0000000..5f69270
--- /dev/null
+++ b/smgl/smgl-upstart/upstart-init/avahi.conf
@@ -0,0 +1,17 @@
+# avahi
+#
+# starts avahi-daemon
+
+description "Enable avahi-daemon"
+author "Arjan Bouter <abouter AT sourcemage.org>"
+
+start on syslog-start and network-start and started dbus
+stop on shutdown or network-stop or stopping dbus
+
+expect daemon
+
+exec /usr/sbin/avahi-daemon -D
+
+post-stop script
+ [ -e /var/run/avahi-daemon/socket] && rm -f /var/run/avahi-daemon/*
+end script
diff --git a/smgl/smgl-upstart/upstart-init/avahi.override
b/smgl/smgl-upstart/upstart-init/avahi.override
new file mode 100644
index 0000000..2905494
--- /dev/null
+++ b/smgl/smgl-upstart/upstart-init/avahi.override
@@ -0,0 +1 @@
+manual
diff --git a/smgl/smgl-upstart/upstart-init/clamav.conf
b/smgl/smgl-upstart/upstart-init/clamav.conf
new file mode 100644
index 0000000..e92d5ec
--- /dev/null
+++ b/smgl/smgl-upstart/upstart-init/clamav.conf
@@ -0,0 +1,13 @@
+# clamav
+#
+# starts clamd
+
+description "Start ClamAV"
+author "Arjan Bouter <abouter AT sourcemage.org>"
+
+start on mounted-remotefs and syslog-start
+stop on shutdown
+
+expect fork
+
+exec /usr/sbin/clamd
diff --git a/smgl/smgl-upstart/upstart-init/control-alt-delete.conf
b/smgl/smgl-upstart/upstart-init/control-alt-delete.conf
new file mode 100644
index 0000000..e338bb6
--- /dev/null
+++ b/smgl/smgl-upstart/upstart-init/control-alt-delete.conf
@@ -0,0 +1,14 @@
+# control-alt-delete - emergency keypress handling
+#
+# This task is run whenever the Control-Alt-Delete key combination is
+# pressed, and performs a safe reboot of the machine.
+
+description "emergency keypress handling"
+author "Scott James Remnant <scott AT netsplit.com>"
+
+start on control-alt-delete
+
+task
+script
+ initctl emit --no-wait shutdown
+end script
diff --git a/smgl/smgl-upstart/upstart-init/dbus.conf
b/smgl/smgl-upstart/upstart-init/dbus.conf
new file mode 100644
index 0000000..0f269da
--- /dev/null
+++ b/smgl/smgl-upstart/upstart-init/dbus.conf
@@ -0,0 +1,20 @@
+# dbus
+#
+# starts dbus
+
+description "Start a dbus daemon"
+author "Arjan Bouter <abouter AT sourcemage.org>"
+
+start on started devices
+stop on shutdown
+
+pre-start script
+ [ -e /var/run/dbus/pid ] && rm -rf /var/run/dbus
+ [ -d /var/run/dbus ] || mkdir -p /var/run/dbus
+end script
+
+expect fork
+
+exec dbus-daemon --system --fork
+
+post-start exec dbus-uuidgen --ensure
diff --git a/smgl/smgl-upstart/upstart-init/devices.conf
b/smgl/smgl-upstart/upstart-init/devices.conf
new file mode 100644
index 0000000..85ff7e0
--- /dev/null
+++ b/smgl/smgl-upstart/upstart-init/devices.conf
@@ -0,0 +1,22 @@
+# devices
+#
+# set up devices in /dev when needed
+
+description "Sets hostname"
+author "Arjan Bouter <abouter AT sourcemage.org>"
+
+start on mounted-rootfs
+
+task
+
+pre-start script
+ echo "devices pre-start"
+ . /etc/sysconfig/devices
+ if [ $DEVICES=udev ]; then
+ start udev
+ fi
+end script
+
+script
+ echo "devices started"
+end script
diff --git a/smgl/smgl-upstart/upstart-init/displaymanager.conf
b/smgl/smgl-upstart/upstart-init/displaymanager.conf
new file mode 100644
index 0000000..4b87243
--- /dev/null
+++ b/smgl/smgl-upstart/upstart-init/displaymanager.conf
@@ -0,0 +1,14 @@
+# displaymanager
+#
+# starts a login manager
+
+description "Starts a display manager (XDM,GDM,KDM,Entrance...)"
+author "Arjan Bouter <abouter AT sourcemage.org>"
+
+start on started hald and syslog-start and started tty1
+stop on shutdown or stopping hald
+
+script
+ . /etc/sysconfig/facilities
+ exec $display_manager
+end script
diff --git a/smgl/smgl-upstart/upstart-init/freshclam.conf
b/smgl/smgl-upstart/upstart-init/freshclam.conf
new file mode 100644
index 0000000..ea2cdab
--- /dev/null
+++ b/smgl/smgl-upstart/upstart-init/freshclam.conf
@@ -0,0 +1,13 @@
+# freshclam
+#
+# starts freshclam
+
+description "Start Freshclam, the Clamav updater"
+author "Arjan Bouter <abouter AT sourcemage.org>"
+
+start on mounted-remotefs and syslog-start
+stop on shutdown or network-stop
+
+expect fork
+
+exec /usr/bin/freshclam -d
diff --git a/smgl/smgl-upstart/upstart-init/hald.conf
b/smgl/smgl-upstart/upstart-init/hald.conf
new file mode 100644
index 0000000..f97aa0a
--- /dev/null
+++ b/smgl/smgl-upstart/upstart-init/hald.conf
@@ -0,0 +1,14 @@
+# hald
+#
+# starts a hald daemon
+
+description "Start a hald demon"
+author "Arjan Bouter <abouter AT sourcemage.org>"
+
+start on mounted-remotefs and syslog-start
+stop on shutdown or stopping dbus
+
+expect fork
+respawn
+
+exec /usr/sbin/hald --use-syslog
diff --git a/smgl/smgl-upstart/upstart-init/hostname.conf
b/smgl/smgl-upstart/upstart-init/hostname.conf
new file mode 100644
index 0000000..0aaf3c4
--- /dev/null
+++ b/smgl/smgl-upstart/upstart-init/hostname.conf
@@ -0,0 +1,12 @@
+# hostname
+#
+# set the hostname to whatever is in /etc/hostname
+
+description "Sets hostname"
+author "Arjan Bouter <abouter AT sourcemage.org>"
+
+start on started devices
+
+task
+
+exec hostname --file /etc/hostname
diff --git a/smgl/smgl-upstart/upstart-init/ifupdown.conf
b/smgl/smgl-upstart/upstart-init/ifupdown.conf
new file mode 100644
index 0000000..04d14f5
--- /dev/null
+++ b/smgl/smgl-upstart/upstart-init/ifupdown.conf
@@ -0,0 +1,26 @@
+# network
+#
+# starts networking
+
+description "Start networking"
+author "Arjan Bouter <abouter AT sourcemage.org>"
+
+start on started devices
+
+task
+
+pre-start script
+ ifdown -a
+end script
+
+script
+ echo "bringing up network interfaces"
+ ifconfig lo 127.0.0.1
+ ifup -a
+end script
+
+# only enable this if your NETWORK_INIT doesn't
+# have a way to run a script once the connection
+# is actually up, like /etc/network/scripts for
+# ifupdown or /etc/wicd/scripts for wicd
+#post-start exec initctl emit --no-wait network-start
diff --git a/smgl/smgl-upstart/upstart-init/libvirtd.conf
b/smgl/smgl-upstart/upstart-init/libvirtd.conf
new file mode 100644
index 0000000..fd7d6a4
--- /dev/null
+++ b/smgl/smgl-upstart/upstart-init/libvirtd.conf
@@ -0,0 +1,18 @@
+# libvirtd
+#
+# starts libvirtd
+
+description "Start libvirtd"
+author "Arjan Bouter <abouter AT sourcemage.org>"
+
+start on started xend
+stop on stopping xend
+
+expect fork
+
+pre-start script
+ [ ! -d /var/run/libvirt ] && mkdir -p /var/run/libvirt
+end script
+
+
+exec libvirtd
diff --git a/smgl/smgl-upstart/upstart-init/lighttpd.conf
b/smgl/smgl-upstart/upstart-init/lighttpd.conf
new file mode 100644
index 0000000..b938e6d
--- /dev/null
+++ b/smgl/smgl-upstart/upstart-init/lighttpd.conf
@@ -0,0 +1,13 @@
+# lighttpd
+#
+# starts lighttpd
+
+description "Start lighttpd"
+author "Arjan Bouter <abouter AT sourcemage.org>"
+
+start on mounted-remotefs
+stop on shutdown or network-stop
+
+expect daemon
+
+exec /usr/sbin/lighttpd -f /etc/lighttpd.conf
diff --git a/smgl/smgl-upstart/upstart-init/lighttpd.override
b/smgl/smgl-upstart/upstart-init/lighttpd.override
new file mode 100644
index 0000000..2905494
--- /dev/null
+++ b/smgl/smgl-upstart/upstart-init/lighttpd.override
@@ -0,0 +1 @@
+manual
diff --git a/smgl/smgl-upstart/upstart-init/mariadb.conf
b/smgl/smgl-upstart/upstart-init/mariadb.conf
new file mode 100644
index 0000000..63abcf5
--- /dev/null
+++ b/smgl/smgl-upstart/upstart-init/mariadb.conf
@@ -0,0 +1,41 @@
+# mariadb
+#
+# starts mariadb
+
+description "Start mariadb"
+author "Arjan Bouter <abouter AT sourcemage.org>"
+
+start on mounted-remotefs
+
+pre-start script
+ . /etc/sysconfig/mariadb
+ [[ -d "$DATA_DIR" ]] || mkdir -p "$DATA_DIR"
+end script
+
+script
+ . /etc/sysconfig/mariadb
+ # set some defaults for mariadb.server
+ datadir="${DATA_DIR}"
+ if [[ -z "$basedir" ]]; then
+ basedir=/usr
+ bindir=/usr/bin
+ else
+ bindir="${basedir}/bin"
+ fi
+ export PATH="/sbin:/usr/sbin:/bin:/usr/bin:$bindir"
+ if [[ -z pid_file ]]; then
+ pid_file="${datadir}/$(hostname).pid"
+ else
+ case "$pid_file" in
+ /* ) ;;
+ * ) pid_file="${datadir}/${pid_file}" ;;
+ esac
+ fi
+ exec $bindir/mysqld_safe --datadir="${datadir}"
+end script
+
+pre-stop script
+ . /etc/sysconfig/mariadb
+ HOSTNAME=$(hostname)
+ kill $(cat "${DATADIR}/${HOSTNAME}.pid")
+end script
diff --git a/smgl/smgl-upstart/upstart-init/mariadb.override
b/smgl/smgl-upstart/upstart-init/mariadb.override
new file mode 100644
index 0000000..2905494
--- /dev/null
+++ b/smgl/smgl-upstart/upstart-init/mariadb.override
@@ -0,0 +1 @@
+manual
diff --git a/smgl/smgl-upstart/upstart-init/mcelog.conf
b/smgl/smgl-upstart/upstart-init/mcelog.conf
new file mode 100644
index 0000000..a91f845
--- /dev/null
+++ b/smgl/smgl-upstart/upstart-init/mcelog.conf
@@ -0,0 +1,13 @@
+# mcelog
+#
+# starts mcelog
+
+description "Start mcelog"
+author "Arjan Bouter <abouter AT sourcemage.org>"
+
+start on syslog-start
+stop on syslog-stop or shutdown
+
+expect daemon
+
+exec /usr/sbin/mcelog --daemon --pidfile /var/run/mcelog.pid
diff --git a/smgl/smgl-upstart/upstart-init/metalog.conf
b/smgl/smgl-upstart/upstart-init/metalog.conf
new file mode 100644
index 0000000..b557706
--- /dev/null
+++ b/smgl/smgl-upstart/upstart-init/metalog.conf
@@ -0,0 +1,19 @@
+# metalog
+#
+# starts a metalog daemon
+
+description "Start a metalog daemon"
+author "Arjan Bouter <abouter AT sourcemage.org>"
+
+emits syslog-start
+
+start on started devices
+stop on shutdown
+
+expect daemon
+
+exec metalog --daemonize --sync
+
+post-start script
+ initctl emit --no-wait syslog-start
+end script
diff --git a/smgl/smgl-upstart/upstart-init/mount_local.conf
b/smgl/smgl-upstart/upstart-init/mount_local.conf
new file mode 100644
index 0000000..a15d9e3
--- /dev/null
+++ b/smgl/smgl-upstart/upstart-init/mount_local.conf
@@ -0,0 +1,14 @@
+# mount_local
+#
+# mount local filesystems
+# based on the init.d init scripts
+
+description "Mounts local filesystems"
+author "Arjan Bouter <abouter AT sourcemage.org>"
+
+emits mounted-localfs
+start on started devices
+
+task
+
+exec /etc/init/scripts/mount_local.sh
diff --git a/smgl/smgl-upstart/upstart-init/mount_remote.conf
b/smgl/smgl-upstart/upstart-init/mount_remote.conf
new file mode 100644
index 0000000..8b2e9f7
--- /dev/null
+++ b/smgl/smgl-upstart/upstart-init/mount_remote.conf
@@ -0,0 +1,17 @@
+# mount_remote
+#
+# mount remote filesystems
+
+description "Mounts remote filesystems"
+author "Arjan Bouter <abouter AT sourcemage.org>"
+
+emits mounted-remotefs
+start on mounted-localfs and network-start
+
+task
+
+script
+ echo whut
+ mount -a -t "cifs,ncpfs,nfs,smbfs,9p"
+ initctl emit --no-wait mounted-remotefs
+end script
diff --git a/smgl/smgl-upstart/upstart-init/mount_root.conf
b/smgl/smgl-upstart/upstart-init/mount_root.conf
new file mode 100644
index 0000000..65c726e
--- /dev/null
+++ b/smgl/smgl-upstart/upstart-init/mount_root.conf
@@ -0,0 +1,15 @@
+# mount_root
+#
+# mount root filesystem and pseudo filesystems
+# based on the init.d init scripts
+
+description "Mounts rootfs and various pseudo filesystems"
+author "Arjan Bouter <abouter AT sourcemage.org>"
+
+emits mounted-rootfs
+
+start on startup
+
+task
+
+exec /etc/init/scripts/mount_root.sh
diff --git a/smgl/smgl-upstart/upstart-init/mpd.conf
b/smgl/smgl-upstart/upstart-init/mpd.conf
new file mode 100644
index 0000000..fdba4e3
--- /dev/null
+++ b/smgl/smgl-upstart/upstart-init/mpd.conf
@@ -0,0 +1,13 @@
+# mpd
+#
+# starts mpd
+
+description "Start Music Player Daemon"
+author "Arjan Bouter <abouter AT sourcemage.org>"
+
+start on mounted-remotefs and syslog-start
+stop on shutdown or network-stop
+
+expect fork
+
+exec /usr/bin/mpd /etc/mpd.conf
diff --git a/smgl/smgl-upstart/upstart-init/native/README
b/smgl/smgl-upstart/upstart-init/native/README
deleted file mode 100644
index 19bbea9..0000000
--- a/smgl/smgl-upstart/upstart-init/native/README
+++ /dev/null
@@ -1,28 +0,0 @@
-Some useful things to know about upstart on smgl
-
-- The jobs upstart knows about are in the *.conf files, one file per
service/daemon/task/job, add or remove the .conf
- part to en-/disable the job
-- The jobs MAY NOT FAIL, or the entire boot process is halted...
-- use a script in the scripts dir and a job pointing to it when a job can
fail and make sure the script exits cleanly
-- if a job needs to emit a signal, name it <jobname>-start or <jobname>-stop
for consistency
-
-feel free to post bugs with additional jobs on http://bugs.sourcemage.org
and assign them to abouter AT sourcemage.org
-I'll get to them eventually, or just put them in the spell yourself if you
have git access ;)
-
-starting and stopping jobs in upstart:
-
- start <jobname>
-
-or
-
- stop <jobname>
-
-where <jobname> is the jobs name in /etc/init without the .conf part.
-
-for example, to start lighty:
-
- start lighttpd
-
-a list of jobs and there status:
-
- initctl list
diff --git a/smgl/smgl-upstart/upstart-init/native/alsa.conf
b/smgl/smgl-upstart/upstart-init/native/alsa.conf
deleted file mode 100644
index def66bf..0000000
--- a/smgl/smgl-upstart/upstart-init/native/alsa.conf
+++ /dev/null
@@ -1,27 +0,0 @@
-# alsa
-#
-# restores alsa settings
-
-description "Restore alsa settings"
-author "Arjan Bouter <abouter AT sourcemage.org>"
-
-start on mount_all-start
-stop on shutdown
-
-emits alsa-start alsa-stop
-
-task
-
-script
- [ -e /etc/sysconfig/alsa ] && . /etc/sysconfig/alsa
- declare -r ASOUNDCFG=/etc/asound.state
- [[ "$START_ALSA" == no ]] && return 0
- if [[ -d /proc/asound ]]; then
- if ! [[ -r "$ASOUNDCFG" ]]; then
- echo "No mixer config in $ASOUNDCFG, you have to unmute your card!"
- else
- /usr/sbin/alsactl -f $ASOUNDCFG restore
- fi
- fi
- initctl emit alsa-start
-end script
diff --git a/smgl/smgl-upstart/upstart-init/native/avahi.conf
b/smgl/smgl-upstart/upstart-init/native/avahi.conf
deleted file mode 100644
index 2fc2c17..0000000
--- a/smgl/smgl-upstart/upstart-init/native/avahi.conf
+++ /dev/null
@@ -1,11 +0,0 @@
-# avahi
-#
-# starts avahi-daemon
-
-description "Enable avahi-daemon"
-author "Arjan Bouter <abouter AT sourcemage.org>"
-
-start on syslog-start and network-start
-stop on shutdown
-
-exec /usr/sbin/avahi-daemon -s
diff --git a/smgl/smgl-upstart/upstart-init/native/clamav
b/smgl/smgl-upstart/upstart-init/native/clamav
deleted file mode 100644
index b3d72de..0000000
--- a/smgl/smgl-upstart/upstart-init/native/clamav
+++ /dev/null
@@ -1,13 +0,0 @@
-# clamav
-#
-# starts clamd
-
-description "Start ClamAV"
-author "Arjan Bouter <abouter AT sourcemage.org>"
-
-emits clamav-started clamav-stopped
-
-start on network-start and syslog-start
-stop on shutdown
-
-exec /usr/sbin/clamd
diff --git a/smgl/smgl-upstart/upstart-init/native/control-alt-delete.conf
b/smgl/smgl-upstart/upstart-init/native/control-alt-delete.conf
deleted file mode 100644
index 590528d..0000000
--- a/smgl/smgl-upstart/upstart-init/native/control-alt-delete.conf
+++ /dev/null
@@ -1,12 +0,0 @@
-# control-alt-delete - emergency keypress handling
-#
-# This task is run whenever the Control-Alt-Delete key combination is
-# pressed, and performs a safe reboot of the machine.
-
-description "emergency keypress handling"
-author "Scott James Remnant <scott AT netsplit.com>"
-
-start on control-alt-delete
-
-task
-exec shutdown -r now "Control-Alt-Delete pressed"
diff --git a/smgl/smgl-upstart/upstart-init/native/dbus.conf
b/smgl/smgl-upstart/upstart-init/native/dbus.conf
deleted file mode 100644
index 4f4d899..0000000
--- a/smgl/smgl-upstart/upstart-init/native/dbus.conf
+++ /dev/null
@@ -1,22 +0,0 @@
-# dbus
-#
-# scans starts dbus
-
-description "Start a dbus daemon"
-author "Arjan Bouter <abouter AT sourcemage.org>"
-
-emits dbus-start dbus-stop
-
-start on mount_all-start
-stop on shutdown
-
-pre-start script
- mkdir -p /var/run/dbus
-end script
-
-script
- [ -e /var/run/dbus/pid ] && rm -rf /var/run/dbus/*
- dbus-daemon --system
- dbus-uuidgen --ensure
- initctl emit dbus-start
-end script
diff --git a/smgl/smgl-upstart/upstart-init/native/devices.conf
b/smgl/smgl-upstart/upstart-init/native/devices.conf
deleted file mode 100644
index 427adcc..0000000
--- a/smgl/smgl-upstart/upstart-init/native/devices.conf
+++ /dev/null
@@ -1,37 +0,0 @@
-# devices
-#
-# populates /dev with devices and does some housekeeping when using udev,
-# does nothing at all when using static /dev
-
-description "Populates /dev"
-author "Arjan Bouter <abouter AT sourcemage.org>"
-
-start on mount_root-start
-stop on shutdown
-
-emits devices-start
-
-task
-
-script
- [ -e /etc/sysconfig/devices ] && . /etc/sysconfig/devices
- case $DEVICES in
- udev) echo "using udev to manage /dev"
- mount -t tmpfs dev /dev
- ln -s /proc/self/fd /dev/fd
- ln -s /dev/fd/0 /dev/stdin
- ln -s /dev/fd/1 /dev/stdout
- ln -s /dev/fd/2 /dev/stderr
- mkdir -p /dev/shm
- mount -t tmpfs shm /dev/shm
- mkdir -p /dev/pts
- mount -t devpts devpts /dev/pts
- udevd --daemon
- udevadm trigger
- udevadm settle --quiet
- echo "done starting udev" ;;
- static) echo "static /dev nothing to do" ;;
- *) echo "unsupported /dev system, aborting" ;;
- esac
- initctl emit devices-start
-end script
diff --git a/smgl/smgl-upstart/upstart-init/native/freshclam
b/smgl/smgl-upstart/upstart-init/native/freshclam
deleted file mode 100644
index ed678c4..0000000
--- a/smgl/smgl-upstart/upstart-init/native/freshclam
+++ /dev/null
@@ -1,11 +0,0 @@
-# freshclam
-#
-# starts freshclam
-
-description "Start Freshclam, the Clamav updater"
-author "Arjan Bouter <abouter AT sourcemage.org>"
-
-start on network-start and syslog-start
-stop on shutdown
-
-exec /usr/bin/freshclam -d
diff --git a/smgl/smgl-upstart/upstart-init/native/gdm.conf
b/smgl/smgl-upstart/upstart-init/native/gdm.conf
deleted file mode 100644
index abb7d40..0000000
--- a/smgl/smgl-upstart/upstart-init/native/gdm.conf
+++ /dev/null
@@ -1,11 +0,0 @@
-# gdm
-#
-# starts the GDM login manager
-
-description "Start GDM"
-author "Arjan Bouter <abouter AT sourcemage.org>"
-
-start on hald-start
-stop on shutdown
-
-exec /usr/sbin/gdm
diff --git a/smgl/smgl-upstart/upstart-init/native/hald.conf
b/smgl/smgl-upstart/upstart-init/native/hald.conf
deleted file mode 100644
index 1376314..0000000
--- a/smgl/smgl-upstart/upstart-init/native/hald.conf
+++ /dev/null
@@ -1,16 +0,0 @@
-# hald
-#
-# starts a hald daemon
-
-description "Start a hald demon"
-author "Arjan Bouter <abouter AT sourcemage.org>"
-
-start on network-start
-stop on shutdown
-
-emits hald-start hald-stop
-
-script
- /usr/sbin/hald
- initctl emit hald-start
-end script
diff --git a/smgl/smgl-upstart/upstart-init/native/hostname.conf
b/smgl/smgl-upstart/upstart-init/native/hostname.conf
deleted file mode 100644
index 9ac58bc..0000000
--- a/smgl/smgl-upstart/upstart-init/native/hostname.conf
+++ /dev/null
@@ -1,13 +0,0 @@
-# hostname
-#
-# set the hostname to whatever is in /etc/hostname
-
-description "Sets hostname"
-author "Arjan Bouter <abouter AT sourcemage.org>"
-
-start on devices-start
-stop on shutdown
-
-task
-
-exec hostname --file /etc/hostname
diff --git a/smgl/smgl-upstart/upstart-init/native/libvirtd.conf
b/smgl/smgl-upstart/upstart-init/native/libvirtd.conf
deleted file mode 100644
index 06aa4c1..0000000
--- a/smgl/smgl-upstart/upstart-init/native/libvirtd.conf
+++ /dev/null
@@ -1,15 +0,0 @@
-# libvirtd
-#
-# starts libvirtd
-
-description "Start libvirtd"
-author "Arjan Bouter <abouter AT sourcemage.org>"
-
-start on started xend
-stop on stopped xend
-
-pre-start script
- [[ ! -d /var/run/libvirt ]] && mkdir -p /var/run/libvirt
-end script
-
-exec /usr/sbin/libvirtd
diff --git a/smgl/smgl-upstart/upstart-init/native/lighttpd.conf
b/smgl/smgl-upstart/upstart-init/native/lighttpd.conf
deleted file mode 100644
index 455bc54..0000000
--- a/smgl/smgl-upstart/upstart-init/native/lighttpd.conf
+++ /dev/null
@@ -1,11 +0,0 @@
-# lighttpd
-#
-# starts lighttpd
-
-description "Start lighttpd"
-author "Arjan Bouter <abouter AT sourcemage.org>"
-
-start on network-start and syslog-start
-stop on shutdown
-
-exec /usr/sbin/lighttpd -D -f /etc/lighttpd.conf
diff --git a/smgl/smgl-upstart/upstart-init/native/mount_all.conf
b/smgl/smgl-upstart/upstart-init/native/mount_all.conf
deleted file mode 100644
index 2776c69..0000000
--- a/smgl/smgl-upstart/upstart-init/native/mount_all.conf
+++ /dev/null
@@ -1,119 +0,0 @@
-# mount_all
-#
-# mount local filesystems
-# based on the init.d init scripts
-
-description "Mounts local filesystems"
-author "Arjan Bouter <abouter AT sourcemage.org>"
-
-start on devices-start
-stop on shutdown
-
-emits mount_all-start
-
-task
-console output
-
-script
-
- [ -e /etc/sysconfig/init ] && . /etc/sysconfig/init
- [ -e /etc/sysconfig/mountall ] && . /etc/sysconfig/mountall
-
- # find devices that were set up in initramfs/rd
- if [ -x /sbin/dmsetup ]; then
- echo "(re)Creating device mapper nodes..."
- # won't check retval because kernel just may lack device mapper
- dmsetup mknodes || echo "failed (re)creating nodes"
- fi
-
- if [ -x /sbin/vgscan ] && [ -x /sbin/vgchange ]; then
- echo "Scanning for and initializing all available LVM volume groups..."
- /sbin/vgscan --ignorelockingfailure --mknodes
- /sbin/vgchange -ay --ignorelockingfailure
- fi
-
-# if [ -x /usr/sbin/cryptsetup ] && [ -f /etc/crypttab ]; then
-# echo "Attempting to open luks encrypted partitions"
-# grep -v '^#' /etc/crypttab |
-# grep -v '^$' |
-# while read line
-# do
-# if [ -z "$line" ]; then
-# echo "empty crypttab, skipping"
-# else
-# parts=( $line )
-# echo "Opening ${parts[0]} as ${parts[1]}"
-# if cryptsetup isLuks ${parts[0]}; then
-# if [[ -b /dev/mapper/${parts[1]} ]]; then
-# builtin echo "Device already exists maybe its open already"
-# else
-# cryptsetup luksOpen ${parts[0]} ${parts[1]} < /dev/console >
/dev/console 2>&1
-# fi
-# else
-# builtin echo "Error device ${parts[0]} isn't a luks partition"
-# fi
-# fi
-# done
-# fi
-
- [ -e /fastboot ] && return
- [ -e /forcefsck ] && FORCE="-f"
- [ "$NOSOFTFIX" != yes ] && FIX="-a"
- [ "$FSCKFIX" = yes ] && FIX="-y"
- [ -z "$FIX" ] && FIX="-n" # need at least -n, -y, or -a for
non-tty fsck
- [ "$FORCE" = yes ] && FORCE="-f"
-
- echo "Checking file systems..."
- fsck -T -C -A -R $FIX $FORCE
- if [ $? -gt 1 ]; then
- $WARNING
- echo "fsck failed."
- echo "Please repair your file system"
- echo "manually by running /sbin/fsck"
- echo "without the -a option"
- $NORMAL
- /sbin/sulogin
- /sbin/reboot -f
- fi
-
- [ -e /fastboot ] && rm -f /fastboot
- [ -e /forcefsck ] && rm -f /forcefsck
-
- if [ -x /sbin/swapon ]; then
- echo "Activating swap... "
- swapon -a
- fi
-
- echo "Mounting local filesystems..."
-# Fixed so as to not mount networked filesystems yet (no networking)
-# mountnetwork.sh will take care of this.
- mount -a -t nocifs,noncpfs,nonfs,nosmbfs,notmpfs,no9p
-# mount tmpfs mounts after physical partitions they might mount to (bug 3597)
- mount -a -t tmpfs
-
- # bug 7311 - if proc was mounted, list it in mtab; awk is /usr friendly
- if awk 'BEGIN{proc=1} /\/proc/{proc=0} END{exit proc}' /proc/mounts; then
- builtin echo 'none /proc proc rw 0 0' >> /etc/mtab
- fi
-
-#As per FHS sm bug #10509
-#FIXME: doing this here kills upstart... fix this bug again later...
-# echo "Cleaning out /var/run..."
-# [ -d /var/run ] && rm -rf /var/run/*
-
-# if [ "$CLEAN_TMP" == "yes" ] ; then
-# echo "Cleaning out /tmp..."
-# [ -d /tmp ] && shopt -s dotglob && rm -rf /tmp/* && shopt -u dotglob
-# fi
-
- echo "Creating /var/run/utmp..."
- [ -d /var/run ] && touch /var/run/utmp
-
- echo "Writing dmesg log to /var/log/dmesg..."
- [ -d /var/log ] && dmesg > /var/log/dmesg
-
-# echo "Making /tmp/.ICE-unix temporary directory..."
-# [ -d /tmp ] && mkdir -p /tmp/.ICE-unix && chmod 1777 /tmp/.ICE-unix
-
- initctl emit mount_all-start
-end script
diff --git a/smgl/smgl-upstart/upstart-init/native/mount_root.conf
b/smgl/smgl-upstart/upstart-init/native/mount_root.conf
deleted file mode 100644
index eb50886..0000000
--- a/smgl/smgl-upstart/upstart-init/native/mount_root.conf
+++ /dev/null
@@ -1,88 +0,0 @@
-# mount_root
-#
-# mount root filesystem and pseudo filesystems
-# based on the init.d init scripts
-
-description "Mounts rootfs and various pseudo filesystems"
-author "Arjan Bouter <abouter AT sourcemage.org>"
-
-start on startup
-stop on shutdown
-
-emits mount_root-start mount_rootfs-stop
-
-task
-console output
-
-script
- [ -e /etc/sysconfig/init ] && . /etc/sysconfig/init
-
- # proc and sys are needed for scanlvm
- mount -t proc proc /proc
- mount -t sysfs sysfs /sys
-
- # find devices that were set up in initramfs/rd
- if [ -x /sbin/dmsetup ]; then
- echo "(re)Creating device mapper nodes..."
- # won't check retval because kernel just may lack device mapper
- /sbin/dmsetup mknodes
- else
- echo "Not running dmsetup"
- fi
-
- if [ -x /sbin/vgscan ] && [ -x /sbin/vgchange ]; then
- echo "Scanning for and initializing all available LVM volume groups..."
- /sbin/vgscan --ignorelockingfailure --mknodes &&
- /sbin/vgchange -ay --ignorelockingfailure
- else
- echo "Not starting LVM"
- fi
-
- if [ -f /etc/mdadm.conf ] ; then
- echo "Running mdadm"
- mdadm --assemble --scan
- mdadm --follow --scan --delay=120 --daemonise >
/var/run/mdadm.pid
- elif [ -f /etc/raidtab ] ; then
- echo "Running raidstart"
- raidstart --all
- else
- echo "Not auto-starting RAID"
- fi
-
- echo "Mounting root file system read only..."
- mount -n -o remount,ro /
-
- echo "Checking rootfs"
- [ -e /fastboot ] && return
- [ -e /forcefsck ] && FORCE="-f"
- [ "$NOSOFTFIX" != yes ] && FIX="-a"
- [ "$FSCKFIX" = yes ] && FIX="-y"
- [ -z "$FIX" ] && FIX="-n" # need at least -n, -y, or -a for
non-tty fsck
- [ "$FORCE" = yes ] && FORCE="-f"
-
- echo "Checking root file system..."
- /sbin/fsck -T -C $FIX $FORCE /
- if [ $? -gt 1 ]; then
- $WARNING
- echo "fsck failed."
- echo "Please repair your file system"
- echo "manually by running /sbin/fsck"
- echo "without the -a option"
- $NORMAL
- /sbin/sulogin
- /sbin/reboot -f
- fi
-
- echo "Mounting root file system read/write..."
- mount -n -o remount,rw /
- if ! [ -h /etc/mtab ]; then
- builtin echo > /etc/mtab
- fi
- mount -f -o remount,rw /
-
- mount -t tmpfs lock /var/lock
- mount -t tmpfs run /var/run
- mount -t tmpfs tmp /tmp
- echo "done mounting rootfs"
- initctl emit mount_root-start
-end script
diff --git a/smgl/smgl-upstart/upstart-init/native/mpd.conf
b/smgl/smgl-upstart/upstart-init/native/mpd.conf
deleted file mode 100644
index 0d91216..0000000
--- a/smgl/smgl-upstart/upstart-init/native/mpd.conf
+++ /dev/null
@@ -1,16 +0,0 @@
-# mpd
-#
-# starts mpd
-
-description "Start Music Player Daemon"
-author "Arjan Bouter <abouter AT sourcemage.org>"
-
-start on network-start and alsa-start and syslog-start
-stop on shutdown
-
-script
- MPD_DB="$(grep db_file /etc/sysconfig/mpd | cut -d \" -f 2)"
- ARGS="--no-daemon /etc/sysconfig/mpd"
- [[ -z $MPD_DB ]] && ARGS="--create-db $ARGS"
- /usr/bin/mpd $ARGS
-end script
diff --git a/smgl/smgl-upstart/upstart-init/native/network.conf
b/smgl/smgl-upstart/upstart-init/native/network.conf
deleted file mode 100644
index 1c7fc42..0000000
--- a/smgl/smgl-upstart/upstart-init/native/network.conf
+++ /dev/null
@@ -1,26 +0,0 @@
-# network
-#
-# starts networking
-
-description "Start networking"
-author "Arjan Bouter <abouter AT sourcemage.org>"
-
-start on dbus-start
-stop on shutdown
-
-emits network-start
-
-console output
-
-script
- ifconfig lo 127.0.0.1
- . /etc/sysconfig/facilities
- case $network in
- wicd) echo "using wicd to manage your network"
- /usr/sbin/wicd ;;
- network) echo "using ifup -a to bring up networking"
- ifup -a ;;
- *) echo "unknown network provider, aborting" ;;
- esac
- initctl emit network-start
-end script
diff --git a/smgl/smgl-upstart/upstart-init/native/shorewall.conf
b/smgl/smgl-upstart/upstart-init/native/shorewall.conf
deleted file mode 100644
index f87a9ae..0000000
--- a/smgl/smgl-upstart/upstart-init/native/shorewall.conf
+++ /dev/null
@@ -1,34 +0,0 @@
-# shorewall
-#
-# starts shorewall
-
-description "Start shorewall"
-author "Arjan Bouter <abouter AT sourcemage.org>"
-
-start on network-up
-stop on shutdown
-
-task
-console output
-
-script
- . /etc/sysconfig/shorewall
-
- # Shorewall needs /var/log/messages to exist
- if [[ ! -f /var/log/messages ]]
- then
- touch /var/log/messages
- fi &&
- # Create shorewall log file if it doesn't exist
- if [[ ! -f $SHOREWALL_LOG ]]
- then
- touch $SHOREWALL_LOG
- fi &&
- # Shorewall needs subsys
- if [[ ! -d /var/lock/subsys/ ]]
- then
- mkdir -p /var/lock/subsys/
- fi &&
- date "$DATE_FORMAT" >> $SHOREWALL_LOG 2>&1
- shorewall start >> $SHOREWALL_LOG 2>&1
-end script
diff --git a/smgl/smgl-upstart/upstart-init/native/shutdown.conf
b/smgl/smgl-upstart/upstart-init/native/shutdown.conf
deleted file mode 100644
index 57603c8..0000000
--- a/smgl/smgl-upstart/upstart-init/native/shutdown.conf
+++ /dev/null
@@ -1,29 +0,0 @@
-# shutdown
-#
-# crude hack to poweroff
-
-description "Shutdown"
-author "Arjan Bouter <abouter AT sourcemage.org>"
-
-start on shutdown
-#stop on startup
-
-task
-console output
-
-script
- for running_job in $(initctl list|grep running|awk -F' ' '{print $1}'); do
- if [[ "$running_job" = 'tty1' ]]; then
- echo "leave tty1 running, just in case..."
- else
- stop $running_job
- fi
- done
- echo "signalling everything else to stop"
- initctl emit shutdown
- echo "unmounting filesystems"
- umount -a
- sync
- echo "powering off"
- poweroff -f
-end script
diff --git a/smgl/smgl-upstart/upstart-init/native/slapd.conf
b/smgl/smgl-upstart/upstart-init/native/slapd.conf
deleted file mode 100644
index 5f7ca91..0000000
--- a/smgl/smgl-upstart/upstart-init/native/slapd.conf
+++ /dev/null
@@ -1,14 +0,0 @@
-# slapd
-#
-# starts slapd
-
-description "Start OpenLDAP slapd"
-author "Arjan Bouter <abouter AT sourcemage.org>"
-
-start on network-up and syslog-start
-stop on shutdown
-
-script
- . /etc/sysconfig/slapd
- slapd -d -h $SLAPD_URL
-end script
diff --git a/smgl/smgl-upstart/upstart-init/native/sulogin.conf
b/smgl/smgl-upstart/upstart-init/native/sulogin.conf
deleted file mode 100644
index 03823a1..0000000
--- a/smgl/smgl-upstart/upstart-init/native/sulogin.conf
+++ /dev/null
@@ -1,18 +0,0 @@
-# sulogin - rescue mode
-#
-# This task ensures that should the system fail to have any active jobs
-# that the system administrator can rescue it; by giving them a shell.
-
-start on stalled
-
-exec /sbin/sulogin
-console owner
-
-pre-start script
- echo
- echo "The system has reached a state where there are no jobs running."
- echo "A shell will be spawned so that you may start such jobs that
are"
- echo "necessary."
- echo
- echo "Type 'exit' when finished."
-end script
diff --git a/smgl/smgl-upstart/upstart-init/native/syslog.conf
b/smgl/smgl-upstart/upstart-init/native/syslog.conf
deleted file mode 100644
index 21c67e0..0000000
--- a/smgl/smgl-upstart/upstart-init/native/syslog.conf
+++ /dev/null
@@ -1,21 +0,0 @@
-# syslog
-#
-# starts a syslog daemon
-
-description "Start a syslog daemon"
-author "Arjan Bouter <abouter AT sourcemage.org>"
-
-start on filesystems-mounted
-stop on shutdown
-
-emits syslog-start syslog-stop
-
-script
- . /etc/sysconfig/facilities
- case $syslog in
- smgl-metalog) echo "Starting metalog"
- initctl emit syslog-start &
- metalog ;;
- *) echo "unknown syslog provider, aborting" ;;
- esac
-end script
diff --git a/smgl/smgl-upstart/upstart-init/native/tty1.conf
b/smgl/smgl-upstart/upstart-init/native/tty1.conf
deleted file mode 100644
index 9bf1c8d..0000000
--- a/smgl/smgl-upstart/upstart-init/native/tty1.conf
+++ /dev/null
@@ -1,15 +0,0 @@
-# tty1 - agetty
-#
-# This service maintains a getty on tty1 from the point the system is
-# started until it is shut down again.
-
-description "start agetty on tty1"
-author "Arjan Bouter <abouter AT sourcemage.org>"
-
-start on mount_root-start
-# let's keep a tty around for now ;)
-#stop on shutdown
-
-console owner
-respawn
-exec /sbin/agetty /dev/tty1 9600
diff --git a/smgl/smgl-upstart/upstart-init/native/tty2.conf
b/smgl/smgl-upstart/upstart-init/native/tty2.conf
deleted file mode 100644
index 67d5971..0000000
--- a/smgl/smgl-upstart/upstart-init/native/tty2.conf
+++ /dev/null
@@ -1,14 +0,0 @@
-# tty2 - agetty
-#
-# This service maintains a getty on tty2 from the point the system is
-# started until it is shut down again.
-
-description "start agetty on tty2"
-author "Arjan Bouter <abouter AT sourcemage.org>"
-
-start on network-up
-stop on shutdown
-
-console owner
-respawn
-exec /sbin/agetty /dev/tty2 9600
diff --git a/smgl/smgl-upstart/upstart-init/native/tty3.conf
b/smgl/smgl-upstart/upstart-init/native/tty3.conf
deleted file mode 100644
index 7ec7eab..0000000
--- a/smgl/smgl-upstart/upstart-init/native/tty3.conf
+++ /dev/null
@@ -1,14 +0,0 @@
-# tty3 - agetty
-#
-# This service maintains a getty on tty3 from the point the system is
-# started until it is shut down again.
-
-description "start agetty on tty3"
-author "Arjan Bouter <abouter AT sourcemage.org>"
-
-start on network-up
-stop on shutdown
-
-console owner
-respawn
-exec /sbin/agetty /dev/tty3 9600
diff --git a/smgl/smgl-upstart/upstart-init/native/xend.conf
b/smgl/smgl-upstart/upstart-init/native/xend.conf
deleted file mode 100644
index ace598e..0000000
--- a/smgl/smgl-upstart/upstart-init/native/xend.conf
+++ /dev/null
@@ -1,25 +0,0 @@
-# xend
-#
-# starts xend
-
-description "Check for Xen and run xend"
-author "Arjan Bouter <abouter AT sourcemage.org>"
-
-start on network-up and syslog-start
-stop on shutdown
-
-pre-start script
- if xen-detect > /dev/null 2>&1 ; then
- echo 'Running in xen!'
- mount -t xenfs xenfs /proc/xen
- else
- echo "Not running in Xen, won't start xend."
- return 1
- fi
-end script
-
-exec xend start
-
-#stop exec xend stop
-
-#status exec xend status
diff --git a/smgl/smgl-upstart/upstart-init/native/xinetd.conf
b/smgl/smgl-upstart/upstart-init/native/xinetd.conf
deleted file mode 100644
index 0245ddc..0000000
--- a/smgl/smgl-upstart/upstart-init/native/xinetd.conf
+++ /dev/null
@@ -1,11 +0,0 @@
-# xinetd
-#
-# starts xinetd
-
-description "Start xinetd"
-author "Arjan Bouter <abouter AT sourcemage.org>"
-
-start on network-up and syslog-start
-stop on shutdown
-
-exec /usr/sbin/xinetd -dontfork
diff --git a/smgl/smgl-upstart/upstart-init/postgresql.conf
b/smgl/smgl-upstart/upstart-init/postgresql.conf
new file mode 100644
index 0000000..0aa890e
--- /dev/null
+++ b/smgl/smgl-upstart/upstart-init/postgresql.conf
@@ -0,0 +1,29 @@
+# postgresql
+#
+# starts postgresql
+
+description "Start PostrgeSQL"
+author "Arjan Bouter <abouter AT sourcemage.org>"
+
+start on mounted-remotefs
+stop on shutdown or network-stop
+
+expect daemon
+
+script
+ . /etc/sysconfig/postgresql
+ cd "$DBPATH" &&
+ if [[ ! -z $PORT ]]; then
+ PGPORT="-o -p $PORT"
+ fi &&
+ if [[ ! -z $LOGFILE ]]; then
+ PGLOG="-l $LOGFILE"
+ fi &&
+ su $USER -s /bin/sh -c "pg_ctl start -D $DBPATH -s $PGLOG $PGPORT"
+end script
+
+pre-stop script
+ . /etc/sysconfig/postgresql
+ cd "$DBPATH" &&
+ su $USER -s /bin/sh -c "pg_ctl stop -D $DBPATH -m fast"
+end script
diff --git a/smgl/smgl-upstart/upstart-init/postgresql.override
b/smgl/smgl-upstart/upstart-init/postgresql.override
new file mode 100644
index 0000000..2905494
--- /dev/null
+++ b/smgl/smgl-upstart/upstart-init/postgresql.override
@@ -0,0 +1 @@
+manual
diff --git a/smgl/smgl-upstart/upstart-init/scripts/mount_local.sh
b/smgl/smgl-upstart/upstart-init/scripts/mount_local.sh
new file mode 100755
index 0000000..d0e97c0
--- /dev/null
+++ b/smgl/smgl-upstart/upstart-init/scripts/mount_local.sh
@@ -0,0 +1,95 @@
+#!/bin/bash
+# mount_all
+#
+# mount local filesystems
+# based on the init.d init scripts
+
+ [ -e /etc/sysconfig/init ] && . /etc/sysconfig/init
+ [ -e /etc/sysconfig/mountall ] && . /etc/sysconfig/mountall
+
+# if [ -x /usr/sbin/cryptsetup ] && [ -f /etc/crypttab ]; then
+# echo "Attempting to open luks encrypted partitions"
+# grep -v '^#' /etc/crypttab |
+# grep -v '^$' |
+# while read line
+# do
+# if [ -z "$line" ]; then
+# echo "empty crypttab, skipping"
+# else
+# parts=( $line )
+# echo "Opening ${parts[0]} as ${parts[1]}"
+# if cryptsetup isLuks ${parts[0]}; then
+# if [[ -b /dev/mapper/${parts[1]} ]]; then
+# builtin echo "Device already exists maybe its open already"
+# else
+# cryptsetup luksOpen ${parts[0]} ${parts[1]} < /dev/console >
/dev/console 2>&1
+# fi
+# else
+# builtin echo "Error device ${parts[0]} isn't a luks partition"
+# fi
+# fi
+# done
+# fi
+
+# [ -e /fastboot ] && return
+ [ -e /forcefsck ] && FORCE="-f"
+ [ "$NOSOFTFIX" != yes ] && FIX="-a"
+ [ "$FSCKFIX" = yes ] && FIX="-y"
+ [ -z "$FIX" ] && FIX="-n" # need at least -n, -y, or -a for
non-tty fsck
+ [ "$FORCE" = yes ] && FORCE="-f"
+
+ echo "Checking file systems..."
+ fsck -T -C -A -R $FIX $FORCE
+ if [ $? -gt 1 ]; then
+ $WARNING
+ echo "fsck failed."
+ echo "Please repair your file system"
+ echo "manually by running /sbin/fsck"
+ echo "without the -a option"
+ $NORMAL
+ # /sbin/sulogin
+ # /sbin/reboot -f
+ echo "$WARNING WTF! repair your fs! $NORMAL"
+ fi
+
+ [ -e /fastboot ] && rm -f /fastboot
+ [ -e /forcefsck ] && rm -f /forcefsck
+
+ if [ -x /sbin/swapon ]; then
+ echo "Activating swap... "
+ swapon -a
+ fi
+
+ echo "Mounting local filesystems..."
+# Fixed so as to not mount networked filesystems yet (no networking)
+# mountnetwork.sh will take care of this.
+ mount -a -t nocifs,noncpfs,nonfs,nosmbfs,notmpfs,no9p
+# mount tmpfs mounts after physical partitions they might mount to (bug 3597)
+ mount -a -t tmpfs
+
+# # bug 7311 - if proc was mounted, list it in mtab; awk is /usr friendly
+# if awk 'BEGIN{proc=1} /\/proc/{proc=0} END{exit proc}' /proc/mounts; then
+# builtin echo 'none /proc proc rw 0 0' >> /etc/mtab
+# fi
+
+#As per FHS sm bug #10509
+#FIXME: doing this here kills upstart... fix this bug again later...
+# echo "Cleaning out /var/run..."
+# [ -d /var/run ] && rm -rf /var/run/*
+
+# if [ "$CLEAN_TMP" == "yes" ] ; then
+# echo "Cleaning out /tmp..."
+# [ -d /tmp ] && shopt -s dotglob && rm -rf /tmp/* && shopt -u dotglob
+# fi
+
+ echo "Creating /var/run/utmp..."
+ [ -d /var/run ] && touch /var/run/utmp
+
+ echo "Writing dmesg log to /var/log/dmesg..."
+ [ -d /var/log ] && dmesg > /var/log/dmesg
+
+ echo "Making /tmp/.ICE-unix temporary directory..."
+ [ -d /tmp ] && mkdir -p /tmp/.ICE-unix && chmod 1777 /tmp/.ICE-unix
+
+ initctl emit --no-wait mounted-localfs
+ echo "done mounting other filesystems"
diff --git a/smgl/smgl-upstart/upstart-init/scripts/mount_root.sh
b/smgl/smgl-upstart/upstart-init/scripts/mount_root.sh
new file mode 100755
index 0000000..8d0c9dd
--- /dev/null
+++ b/smgl/smgl-upstart/upstart-init/scripts/mount_root.sh
@@ -0,0 +1,88 @@
+#!/bin/bash
+# mount_root
+#
+# mount root filesystem and pseudo filesystems
+# based on the init.d init scripts
+
+ [ -e /etc/sysconfig/init ] && . /etc/sysconfig/init
+
+ # proc and sys are needed for scanlvm
+ mount -t proc proc /proc
+ mount -t sysfs sysfs /sys
+
+ echo "Mounting root file system read write..."
+ mount -n -o remount,rw /
+
+ # find devices that were set up in initramfs/rd
+ if [ -x /sbin/dmsetup ]; then
+ echo "(re)Creating device mapper nodes..."
+ # Make sure dmsetup doesn't halt mount_root because kernel just may
+ # lack device mapper
+ dmsetup mknodes
+ echo "Done messing with device nodes"
+ else
+ echo "Not running dmsetup"
+ fi
+
+ if [ -x /sbin/vgscan ] && [ -x /sbin/vgchange ]; then
+ echo "Scanning for and initializing all available LVM volume groups..."
+ /sbin/vgscan --ignorelockingfailure --mknodes
+ /sbin/vgchange -ay --ignorelockingfailure
+ else
+ echo "Not starting LVM"
+ fi
+
+ if [ -f /etc/mdadm.conf ] ; then
+ echo "Running mdadm"
+ mdadm --assemble --scan
+ mdadm --follow --scan --delay=120 --daemonise >
/var/run/mdadm.pid
+ elif [ -f /etc/raidtab ] ; then
+ echo "Running raidstart"
+ raidstart --all
+ else
+ echo "Not auto-starting RAID"
+ fi
+
+ echo "Mounting root file system read only..."
+ mount -n -o remount,ro /
+
+ echo "Checking rootfs"
+ [ -e /fastboot ] && return
+ [ -e /forcefsck ] && FORCE="-f"
+ [ "$NOSOFTFIX" != yes ] && FIX="-a"
+ [ "$FSCKFIX" = yes ] && FIX="-y"
+ [ -z "$FIX" ] && FIX="-n" # need at least -n, -y, or -a for
non-tty fsck
+ [ "$FORCE" = yes ] && FORCE="-f"
+
+ echo "Checking root file system..."
+ /sbin/fsck -T -C $FIX $FORCE /
+ if [ $? -gt 1 ]; then
+ $WARNING
+ echo "fsck failed."
+ echo "Please repair your file system"
+ echo "manually by running /sbin/fsck"
+ echo "without the -a option"
+ $NORMAL
+ /sbin/sulogin
+ /sbin/reboot -f
+ fi
+
+ echo "Mounting root file system read/write..."
+ mount -n -o remount,rw /
+ if ! [ -h /etc/mtab ]; then
+ builtin echo > /etc/mtab
+ fi
+ mount -f -o remount,rw /
+
+ mount -t tmpfs lock /var/lock
+# upstart uses /var/run, do not mount a tmpfs over it
+# mount -t tmpfs run /var/run
+ mount -t tmpfs tmp /tmp
+
+# [[ -x /sbin/selinuxenabled ]] && if selinuxenabled ; then
+# [[ -d /selinux ]] || mkdir -p /selinux
+# mount -t selinuxfs selinux /selinux
+# fi
+
+ initctl emit --no-wait mounted-rootfs || echo "failed preparing your
rootfs"
+ echo "done processing mout_root"
diff --git a/smgl/smgl-upstart/upstart-init/shorewall.conf
b/smgl/smgl-upstart/upstart-init/shorewall.conf
new file mode 100644
index 0000000..4d45afd
--- /dev/null
+++ b/smgl/smgl-upstart/upstart-init/shorewall.conf
@@ -0,0 +1,35 @@
+# shorewall
+#
+# starts shorewall
+
+description "Start shorewall"
+author "Arjan Bouter <abouter AT sourcemage.org>"
+
+start on network-start
+
+task
+
+pre-start script
+ . /etc/sysconfig/shorewall
+
+ # Shorewall needs /var/lock/subsys
+ if [[ ! -d /var/lock/subsys/ ]]
+ then
+ mkdir -p /var/lock/subsys/
+ fi
+
+ # Shorewall needs /var/log/messages to exist
+ if [[ ! -f /var/log/messages ]]
+ then
+ touch /var/log/messages
+ fi
+end script
+
+script
+ SHOREWALL_STATUS="$(awk '{print $1}' /var/lib/shorewall/state)"
+ if [[ "$SHOREWALL_STATUS" = "Stopped" ]]; then
+ shorewall start
+ else
+ shorewall restart
+ fi
+end script
diff --git a/smgl/smgl-upstart/upstart-init/shorewall6.conf
b/smgl/smgl-upstart/upstart-init/shorewall6.conf
new file mode 100644
index 0000000..8a6522b
--- /dev/null
+++ b/smgl/smgl-upstart/upstart-init/shorewall6.conf
@@ -0,0 +1,35 @@
+# shorewall6
+#
+# starts shorewall6
+
+description "Start shorewall6"
+author "Arjan Bouter <abouter AT sourcemage.org>"
+
+start on network-start
+
+task
+
+pre-start script
+ . /etc/sysconfig/shorewall
+
+ # Shorewall needs /var/lock/subsys
+ if [[ ! -d /var/lock/subsys/ ]]
+ then
+ mkdir -p /var/lock/subsys/
+ fi
+
+ # Shorewall needs /var/log/messages to exist
+ if [[ ! -f /var/log/messages ]]
+ then
+ touch /var/log/messages
+ fi
+end script
+
+script
+ SHOREWALL_STATUS="$(awk '{print $1}' /var/lib/shorewall6/state)"
+ if [[ "$SHOREWALL_STATUS" = "Stopped" ]]; then
+ shorewall6 start
+ else
+ shorewall6 restart
+ fi
+end script
diff --git a/smgl/smgl-upstart/upstart-init/shutdown.conf
b/smgl/smgl-upstart/upstart-init/shutdown.conf
new file mode 100644
index 0000000..27c9d14
--- /dev/null
+++ b/smgl/smgl-upstart/upstart-init/shutdown.conf
@@ -0,0 +1,34 @@
+# shutdown
+#
+# crude hack to poweroff
+
+description "Shutdown"
+author "Arjan Bouter <abouter AT sourcemage.org>"
+
+start on shutdown
+
+task
+console output
+
+script
+ echo "signalling everything to stop"
+ initctl emit shutdown && sleep 5
+ for running_job in $(initctl list|grep running|awk -F' ' '{print $1}'); do
+ if [[ "$running_job" = 'tty1' ]]; then
+ echo "leave tty1 running, just in case..."
+ elif [[ "$running_job" = 'shutdown' ]]; then
+ echo "leave shutdown running, obviously"
+ elif [[ "$running_job" = 'init' ]]; then
+ echo "leave init running, obviously"
+ else
+ echo "Stopping job $running_job"
+ stop $running_job
+ fi
+ done
+ echo "unmounting filesystems"
+ umount -a -t notmpfs
+ killall udevd
+ sync
+ echo "powering off"
+ poweroff -f
+end script
diff --git a/smgl/smgl-upstart/upstart-init/slapd.conf
b/smgl/smgl-upstart/upstart-init/slapd.conf
new file mode 100644
index 0000000..f8f6aa7
--- /dev/null
+++ b/smgl/smgl-upstart/upstart-init/slapd.conf
@@ -0,0 +1,16 @@
+# slapd
+#
+# starts slapd
+
+description "Start OpenLDAP slapd"
+author "Arjan Bouter <abouter AT sourcemage.org>"
+
+start on mounted-remotefs
+stop on shutdown or network-stop
+
+expect daemon
+
+script
+ . /etc/sysconfig/slapd
+ slapd -h $SLAPD_URL
+end script
diff --git a/smgl/smgl-upstart/upstart-init/slapd.override
b/smgl/smgl-upstart/upstart-init/slapd.override
new file mode 100644
index 0000000..2905494
--- /dev/null
+++ b/smgl/smgl-upstart/upstart-init/slapd.override
@@ -0,0 +1 @@
+manual
diff --git a/smgl/smgl-upstart/upstart-init/snort.conf
b/smgl/smgl-upstart/upstart-init/snort.conf
new file mode 100644
index 0000000..6fd0d05
--- /dev/null
+++ b/smgl/smgl-upstart/upstart-init/snort.conf
@@ -0,0 +1,13 @@
+# snort
+#
+# starts snort
+
+description "Start snort"
+author "Arjan Bouter <abouter AT sourcemage.org>"
+
+start on started postgresql
+stop on shutdown stopping postgresql
+
+expect fork
+
+exec snort -D -u snort -g snort -c /etc/snort/snort.conf -i wlan0
diff --git a/smgl/smgl-upstart/upstart-init/snort.override
b/smgl/smgl-upstart/upstart-init/snort.override
new file mode 100644
index 0000000..2905494
--- /dev/null
+++ b/smgl/smgl-upstart/upstart-init/snort.override
@@ -0,0 +1 @@
+manual
diff --git a/smgl/smgl-upstart/upstart-init/sshd.conf
b/smgl/smgl-upstart/upstart-init/sshd.conf
new file mode 100644
index 0000000..df065e4
--- /dev/null
+++ b/smgl/smgl-upstart/upstart-init/sshd.conf
@@ -0,0 +1,13 @@
+# sshd
+#
+# starts openssh's sshd
+
+description "Start sshd"
+author "Arjan Bouter <abouter AT sourcemage.org>"
+
+start on mounted-remotefs and syslog-start
+stop on shutdown or network-stop
+
+expect fork
+
+exec /usr/sbin/sshd
diff --git a/smgl/smgl-upstart/upstart-init/sulogin.conf
b/smgl/smgl-upstart/upstart-init/sulogin.conf
new file mode 100644
index 0000000..dc958cc
--- /dev/null
+++ b/smgl/smgl-upstart/upstart-init/sulogin.conf
@@ -0,0 +1,19 @@
+# sulogin - rescue mode
+#
+# This task ensures that should the system fail to have any active jobs
+# that the system administrator can rescue it; by giving them a shell.
+
+start on stalled
+
+console owner
+
+pre-start script
+ echo ""
+ echo "The system has reached a state where there are no jobs running."
+ echo "A shell will be spawned so that you may start such jobs that
are"
+ echo "necessary."
+ echo ""
+ echo "Type 'exit' when finished."
+end script
+
+exec /sbin/sulogin
diff --git
a/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/control-alt-delete
b/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/control-alt-delete
deleted file mode 100644
index 35cb130..0000000
--- a/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/control-alt-delete
+++ /dev/null
@@ -1,8 +0,0 @@
-# control-alt-delete - emergency keypress handling
-#
-# This task is run whenever the Control-Alt-Delete key combination is
-# pressed. Usually used to shut down the machine.
-
-start on control-alt-delete
-
-exec /sbin/shutdown -r now "Control-Alt-Delete pressed"
diff --git a/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/rc-default
b/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/rc-default
deleted file mode 100644
index 191763d..0000000
--- a/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/rc-default
+++ /dev/null
@@ -1,23 +0,0 @@
-# rc - runlevel compatibility
-#
-# This task guesses what the "default runlevel" should be and starts the
-# appropriate script.
-
-start on stopped rcS
-
-script
- runlevel --reboot || true
-
- if grep -q -w -- "-s\|single\|S" /proc/cmdline; then
- telinit S
- elif [ -r /etc/inittab ]; then
- RL="$(sed -n -e "/^id:[0-9]*:initdefault:/{s/^id://;s/:.*//;p}"
/etc/inittab || true)"
- if [ -n "$RL" ]; then
- telinit $RL
- else
- telinit 2
- fi
- else
- telinit 2
- fi
-end script
diff --git a/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/rc0
b/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/rc0
deleted file mode 100644
index bbd56b3..0000000
--- a/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/rc0
+++ /dev/null
@@ -1,25 +0,0 @@
-# rc0 - runlevel 0 compatibility
-#
-# This task runs the old sysv-rc runlevel 0 ("halt/poweroff") scripts with
-# the decision as to whether to halt or power off the system left up to the
-# script (and thus /etc/default/poweroff).
-
-start on runlevel 0
-
-stop on runlevel
-
-console output
-script
- set $(runlevel || true)
- if [ "$2" != "0" ] && [ "$2" != "6" ]; then
- set $(runlevel --set 0 || true)
- fi
-
- if [ "$1" != "unknown" ]; then
- PREVLEVEL=$1
- RUNLEVEL=$2
- export PREVLEVEL RUNLEVEL
- fi
-
- exec /etc/init/rc 0
-end script
diff --git a/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/rc1
b/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/rc1
deleted file mode 100644
index edd3284..0000000
--- a/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/rc1
+++ /dev/null
@@ -1,19 +0,0 @@
-# rc1 - runlevel 1 compatibility
-#
-# This task runs the old sysv-rc runlevel 1 ("single-user") scripts.
-
-start on runlevel 1
-
-stop on runlevel
-
-console output
-script
- set $(runlevel --set 1 || true)
- if [ "$1" != "unknown" ]; then
- PREVLEVEL=$1
- RUNLEVEL=$2
- export PREVLEVEL RUNLEVEL
- fi
-
- exec /etc/init/rc 1
-end script
diff --git a/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/rc2
b/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/rc2
deleted file mode 100644
index 0068fe9..0000000
--- a/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/rc2
+++ /dev/null
@@ -1,20 +0,0 @@
-# rc2 - runlevel 2 compatibility
-#
-# This task runs the old sysv-rc runlevel 2 ("multi-user") scripts. It
-# is usually started by the telinit compatibility wrapper.
-
-start on runlevel 2
-
-stop on runlevel
-
-console output
-script
- set $(runlevel --set 2 || true)
- if [ "$1" != "unknown" ]; then
- PREVLEVEL=$1
- RUNLEVEL=$2
- export PREVLEVEL RUNLEVEL
- fi
-
- exec /etc/init/rc 2
-end script
diff --git a/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/rc3
b/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/rc3
deleted file mode 100644
index 7b71b3e..0000000
--- a/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/rc3
+++ /dev/null
@@ -1,20 +0,0 @@
-# rc3 - runlevel 3 compatibility
-#
-# This task runs the old sysv-rc runlevel 3 (user defined) scripts. It
-# is usually started by the telinit compatibility wrapper.
-
-start on runlevel 3
-
-stop on runlevel
-
-console output
-script
- set $(runlevel --set 3 || true)
- if [ "$1" != "unknown" ]; then
- PREVLEVEL=$1
- RUNLEVEL=$2
- export PREVLEVEL RUNLEVEL
- fi
-
- exec /etc/init/rc 3
-end script
diff --git a/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/rc4
b/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/rc4
deleted file mode 100644
index 6fbe51f..0000000
--- a/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/rc4
+++ /dev/null
@@ -1,20 +0,0 @@
-# rc4 - runlevel 4 compatibility
-#
-# This task runs the old sysv-rc runlevel 4 (user defined) scripts. It
-# is usually started by the telinit compatibility wrapper.
-
-start on runlevel 4
-
-stop on runlevel
-
-console output
-script
- set $(runlevel --set 4 || true)
- if [ "$1" != "unknown" ]; then
- PREVLEVEL=$1
- RUNLEVEL=$2
- export PREVLEVEL RUNLEVEL
- fi
-
- exec /etc/init/rc 4
-end script
diff --git a/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/rc5
b/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/rc5
deleted file mode 100644
index 8af5080..0000000
--- a/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/rc5
+++ /dev/null
@@ -1,20 +0,0 @@
-# rc5 - runlevel 5 compatibility
-#
-# This task runs the old sysv-rc runlevel 5 (user defined) scripts. It
-# is usually started by the telinit compatibility wrapper.
-
-start on runlevel 5
-
-stop on runlevel
-
-console output
-script
- set $(runlevel --set 5 || true)
- if [ "$1" != "unknown" ]; then
- PREVLEVEL=$1
- RUNLEVEL=$2
- export PREVLEVEL RUNLEVEL
- fi
-
- exec /etc/init/rc 5
-end script
diff --git a/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/rc6
b/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/rc6
deleted file mode 100644
index c238837..0000000
--- a/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/rc6
+++ /dev/null
@@ -1,23 +0,0 @@
-# rc6 - runlevel 6 compatibility
-#
-# This task runs the old sysv-rc runlevel 6 ("reboot") scripts.
-
-start on runlevel 6
-
-stop on runlevel
-
-console output
-script
- set $(runlevel || true)
- if [ "$2" != "0" ] && [ "$2" != "6" ]; then
- set $(runlevel --set 6 || true)
- fi
-
- if [ "$1" != "unknown" ]; then
- PREVLEVEL=$1
- RUNLEVEL=$2
- export PREVLEVEL RUNLEVEL
- fi
-
- exec /etc/init/rc 6
-end script
diff --git a/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/rcS
b/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/rcS
deleted file mode 100644
index 3eccece..0000000
--- a/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/rcS
+++ /dev/null
@@ -1,24 +0,0 @@
-# rcS - runlevel compatibility
-#
-# This task runs the old sysv-rc startup scripts.
-
-start on startup
-
-stop on runlevel
-
-# Note: there can be no previous runlevel here, if we have one it's bad
-# information (we enter rc1 not rcS for maintenance). Run /etc/init/rc
-# without information so that it defaults to previous=N runlevel=S.
-console output
-script
- runlevel --set S >/dev/null || true
-
- #set $(runlevel --set S || true)
- #if [ "$1" != "unknown" ]; then
- # PREVLEVEL=$1
- # RUNLEVEL=$2
- # export PREVLEVEL RUNLEVEL
- #fi
-
- exec /etc/init/rcS
-end script
diff --git a/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/rcS-sulogin
b/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/rcS-sulogin
deleted file mode 100644
index 40fd13a..0000000
--- a/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/rcS-sulogin
+++ /dev/null
@@ -1,25 +0,0 @@
-# rcS-sulogin - "single-user" runlevel compatibility
-#
-# This task runs the sulogin binary during "single-user" mode.
-
-start on runlevel S
-
-stop on runlevel
-
-console owner
-
-script
- runlevel --set S >/dev/null || true
- /sbin/sulogin
-
- if [ -r /etc/inittab ]; then
- RL="$(sed -n -e "/^id:[0-9]*:initdefault:/{s/^id://;s/:.*//;p}"
/etc/inittab || true)"
- if [ -n "$RL" ]; then
- telinit $RL
- else
- telinit 2
- fi
- else
- telinit 2
- fi
-end script
diff --git a/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/sulogin
b/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/sulogin
deleted file mode 100644
index 931fb06..0000000
--- a/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/sulogin
+++ /dev/null
@@ -1,18 +0,0 @@
-# sulogin - rescue mode
-#
-# This task ensures that should the system fail to have any active jobs
-# that the system administrator can rescue it; by giving them a shell.
-
-#start on stalled
-
-exec /sbin/sulogin
-console owner
-
-pre-start script
- echo
- echo "The system has reached a state where there are no jobs running."
- echo "A shell will be spawned so that you may start such jobs that
are"
- echo "necessary."
- echo
- echo "Type 'exit' when finished."
-end script
diff --git a/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/tty1
b/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/tty1
deleted file mode 100644
index 9f653b5..0000000
--- a/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/tty1
+++ /dev/null
@@ -1,16 +0,0 @@
-# tty1 - getty
-#
-# This service maintains a getty on tty1 from the point the system is
-# started until it is shut down again.
-
-start on runlevel 2
-start on runlevel 3
-start on runlevel 4
-start on runlevel 5
-
-stop on runlevel 0
-stop on runlevel 1
-stop on runlevel 6
-
-respawn
-exec /sbin/getty 38400 tty1
diff --git a/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/tty2
b/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/tty2
deleted file mode 100644
index 3f07f87..0000000
--- a/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/tty2
+++ /dev/null
@@ -1,16 +0,0 @@
-# tty2 - getty
-#
-# This service maintains a getty on tty2 from the point the system is
-# started until it is shut down again.
-
-start on runlevel 2
-start on runlevel 3
-
-stop on runlevel 0
-stop on runlevel 1
-stop on runlevel 4
-stop on runlevel 5
-stop on runlevel 6
-
-respawn
-exec /sbin/getty 38400 tty2
diff --git a/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/tty3
b/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/tty3
deleted file mode 100644
index b489222..0000000
--- a/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/tty3
+++ /dev/null
@@ -1,16 +0,0 @@
-# tty3 - getty
-#
-# This service maintains a getty on tty3 from the point the system is
-# started until it is shut down again.
-
-start on runlevel 2
-start on runlevel 3
-
-stop on runlevel 0
-stop on runlevel 1
-stop on runlevel 4
-stop on runlevel 5
-stop on runlevel 6
-
-respawn
-exec /sbin/getty 38400 tty3
diff --git a/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/tty4
b/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/tty4
deleted file mode 100644
index ea1783c..0000000
--- a/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/tty4
+++ /dev/null
@@ -1,16 +0,0 @@
-# tty4 - getty
-#
-# This service maintains a getty on tty4 from the point the system is
-# started until it is shut down again.
-
-start on runlevel 2
-start on runlevel 3
-
-stop on runlevel 0
-stop on runlevel 1
-stop on runlevel 4
-stop on runlevel 5
-stop on runlevel 6
-
-respawn
-exec /sbin/getty 38400 tty4
diff --git a/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/tty5
b/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/tty5
deleted file mode 100644
index f218908..0000000
--- a/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/tty5
+++ /dev/null
@@ -1,16 +0,0 @@
-# tty5 - getty
-#
-# This service maintains a getty on tty5 from the point the system is
-# started until it is shut down again.
-
-start on runlevel 2
-start on runlevel 3
-
-stop on runlevel 0
-stop on runlevel 1
-stop on runlevel 4
-stop on runlevel 5
-stop on runlevel 6
-
-respawn
-exec /sbin/getty 38400 tty5
diff --git a/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/tty6
b/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/tty6
deleted file mode 100644
index 1c5994e..0000000
--- a/smgl/smgl-upstart/upstart-init/sysvcompat/sysvcompat/tty6
+++ /dev/null
@@ -1,16 +0,0 @@
-# tty6 - getty
-#
-# This service maintains a getty on tty6 from the point the system is
-# started until it is shut down again.
-
-start on runlevel 2
-start on runlevel 3
-
-stop on runlevel 0
-stop on runlevel 1
-stop on runlevel 4
-stop on runlevel 5
-stop on runlevel 6
-
-respawn
-exec /sbin/getty 38400 tty6
diff --git a/smgl/smgl-upstart/upstart-init/tty1.conf
b/smgl/smgl-upstart/upstart-init/tty1.conf
new file mode 100644
index 0000000..3277b59
--- /dev/null
+++ b/smgl/smgl-upstart/upstart-init/tty1.conf
@@ -0,0 +1,15 @@
+# tty1 - agetty
+#
+# This service maintains a getty on tty1 from the point the system is
+# started until it is shut down again.
+
+description "start agetty on tty1"
+author "Arjan Bouter <abouter AT sourcemage.org>"
+
+start on started devices
+# let's keep a tty around for now ;)
+#stop on shutdown
+
+console owner
+respawn
+exec /sbin/agetty /dev/tty1 9600
diff --git a/smgl/smgl-upstart/upstart-init/tty2.conf
b/smgl/smgl-upstart/upstart-init/tty2.conf
new file mode 100644
index 0000000..d62fcca
--- /dev/null
+++ b/smgl/smgl-upstart/upstart-init/tty2.conf
@@ -0,0 +1,14 @@
+# tty2 - agetty
+#
+# This service maintains a getty on tty2 from the point the system is
+# started until it is shut down again.
+
+description "start agetty on tty2"
+author "Arjan Bouter <abouter AT sourcemage.org>"
+
+start on started devices
+stop on shutdown
+
+console owner
+respawn
+exec /sbin/agetty /dev/tty2 9600
diff --git a/smgl/smgl-upstart/upstart-init/tty3.conf
b/smgl/smgl-upstart/upstart-init/tty3.conf
new file mode 100644
index 0000000..a451862
--- /dev/null
+++ b/smgl/smgl-upstart/upstart-init/tty3.conf
@@ -0,0 +1,14 @@
+# tty3 - agetty
+#
+# This service maintains a getty on tty3 from the point the system is
+# started until it is shut down again.
+
+description "start agetty on tty3"
+author "Arjan Bouter <abouter AT sourcemage.org>"
+
+start on started devices
+stop on shutdown
+
+console owner
+respawn
+exec /sbin/agetty /dev/tty3 9600
diff --git a/smgl/smgl-upstart/upstart-init/udev.conf
b/smgl/smgl-upstart/upstart-init/udev.conf
new file mode 100644
index 0000000..817a68b
--- /dev/null
+++ b/smgl/smgl-upstart/upstart-init/udev.conf
@@ -0,0 +1,33 @@
+# devices
+#
+# populates /dev with devices, does some housekeeping when using udev,
+# does nothing at all when using static /dev and might do something in
+# the future for other /dev systems ;)
+
+description "Populates /dev if needed"
+author "Arjan Bouter <abouter AT sourcemage.org>"
+
+# started by devices
+manual
+
+task
+
+script
+ echo "mounting pseudo filesystems and creating links in /dev"
+ mount -t tmpfs dev /dev
+ ln -s /proc/self/fd /dev/fd
+ ln -s /dev/fd/0 /dev/stdin
+ ln -s /dev/fd/1 /dev/stdout
+ ln -s /dev/fd/2 /dev/stderr
+ mkdir -p /dev/shm
+ mount -t tmpfs shm /dev/shm
+ mkdir -p /dev/pts
+ mount -t devpts devpts /dev/pts
+ echo "starting udevd"
+ udevd --daemon
+ echo "triggering udev events"
+ udevadm trigger
+ udevadm settle --quiet
+ echo "creating device nodes"
+ [[ -e /dev/mapper/control ]] && dmsetup mknodes
+end script
diff --git a/smgl/smgl-upstart/upstart-init/watchdog.conf
b/smgl/smgl-upstart/upstart-init/watchdog.conf
new file mode 100644
index 0000000..5930ee3
--- /dev/null
+++ b/smgl/smgl-upstart/upstart-init/watchdog.conf
@@ -0,0 +1,13 @@
+# watchdog
+#
+# starts watchdog
+
+description "Start Watchdog"
+author "Arjan Bouter <abouter AT sourcemage.org>"
+
+start on mounted-localfs
+stop on shutdown
+
+expect daemon
+
+exec /usr/sbin/watchdog
diff --git a/smgl/smgl-upstart/upstart-init/xend.conf
b/smgl/smgl-upstart/upstart-init/xend.conf
new file mode 100644
index 0000000..0c821af
--- /dev/null
+++ b/smgl/smgl-upstart/upstart-init/xend.conf
@@ -0,0 +1,23 @@
+# xend
+#
+# starts xend
+
+description "Check for Xen and run xend"
+author "Arjan Bouter <abouter AT sourcemage.org>"
+
+start on mounted-remotefs
+stop on shutdown
+
+expect fork
+
+pre-start script
+ if xen-detect -N > /dev/null 2>&1 ; then
+ mount -t xenfs xenfs /proc/xen
+ else
+ return 1
+ fi
+end script
+
+exec xend start
+
+pre-stop exec xend stop
diff --git a/smgl/smgl-upstart/upstart-init/xinetd.conf
b/smgl/smgl-upstart/upstart-init/xinetd.conf
new file mode 100644
index 0000000..0f96c2d
--- /dev/null
+++ b/smgl/smgl-upstart/upstart-init/xinetd.conf
@@ -0,0 +1,13 @@
+# xinetd
+#
+# starts xinetd
+
+description "Start xinetd"
+author "Arjan Bouter <abouter AT sourcemage.org>"
+
+start on mounted-remotefs and syslog-start
+stop on shutdown or network-stop
+
+expect fork
+
+exec /usr/sbin/xinetd
diff --git a/smgl/smgl-upstart/upstart-init/xinetd.override
b/smgl/smgl-upstart/upstart-init/xinetd.override
new file mode 100644
index 0000000..2905494
--- /dev/null
+++ b/smgl/smgl-upstart/upstart-init/xinetd.override
@@ -0,0 +1 @@
+manual



  • [SM-Commit] GIT changes to master grimoire by Arjan Bouter (79ac26ba6ca3bfe6bb456882abb0a9b91874d62b), Arjan Bouter, 03/31/2011

Archive powered by MHonArc 2.6.24.

Top of Page