diff options
author | Tim Sander <tim01@vlsi.informatik.tu-darmstadt.de> | 2010-06-01 00:33:06 +0200 |
---|---|---|
committer | Tim Sander <tim01@vlsi.informatik.tu-darmstadt.de> | 2010-06-01 20:58:01 +0200 |
commit | abc5694ecd2a945160b452596a49f58f5011cd71 (patch) | |
tree | f3e7fbc613767a1a85296f7d99974bca718459cb /generic | |
parent | 14bd09b5fce4f423bb2aefbf57554a5d18c41d51 (diff) | |
download | ptxdist-abc5694ecd2a945160b452596a49f58f5011cd71.tar.gz ptxdist-abc5694ecd2a945160b452596a49f58f5011cd71.tar.xz |
upstart: v6.6, unbreak, add new generic init files
Diffstat (limited to 'generic')
-rw-r--r-- | generic/etc/init/hostname.conf | 12 | ||||
-rw-r--r-- | generic/etc/init/loadmodules.conf | 18 | ||||
-rw-r--r-- | generic/etc/init/mount.conf | 16 | ||||
-rw-r--r-- | generic/etc/init/network-interface.conf | 19 | ||||
-rw-r--r-- | generic/etc/init/networking.conf | 14 | ||||
-rw-r--r-- | generic/etc/init/rc.conf | 18 | ||||
-rw-r--r-- | generic/etc/init/rcS.conf | 26 | ||||
-rw-r--r-- | generic/etc/init/syslogd.conf | 14 | ||||
-rw-r--r-- | generic/etc/init/ttyS.conf | 9 |
9 files changed, 146 insertions, 0 deletions
diff --git a/generic/etc/init/hostname.conf b/generic/etc/init/hostname.conf new file mode 100644 index 000000000..8be3cb413 --- /dev/null +++ b/generic/etc/init/hostname.conf @@ -0,0 +1,12 @@ +# hostname - set system hostname +# +# This task is run on startup to set the system hostname from /etc/hostname, +# falling back to "localhost" if that file is not readable or is empty and +# no hostname has yet been set. + +description "set system hostname" + +start on filesystem + +task +exec hostname -F /etc/hostname diff --git a/generic/etc/init/loadmodules.conf b/generic/etc/init/loadmodules.conf new file mode 100644 index 000000000..4fc9fd8c1 --- /dev/null +++ b/generic/etc/init/loadmodules.conf @@ -0,0 +1,18 @@ +# module-init-tools - load modules from /etc/modules +# +# This task loads the kernel modules specified in the /etc/modules file + +description "load modules from /etc/modules" + +start on (startup + and started udev) + +task +script + grep '^[^#]' /etc/modules | + while read module args + do + [ "$module" ] || continue + modprobe $module $args || : + done +end script diff --git a/generic/etc/init/mount.conf b/generic/etc/init/mount.conf new file mode 100644 index 000000000..ff7077779 --- /dev/null +++ b/generic/etc/init/mount.conf @@ -0,0 +1,16 @@ +# mount-proc - mount proc +# + +description "mount proc on startup" + +start on startup + +emits filesystem + +console owner +script + echo "remounting root rw" + mount -o remount,rw / + initctl emit filesystem +end script + diff --git a/generic/etc/init/network-interface.conf b/generic/etc/init/network-interface.conf new file mode 100644 index 000000000..c0b6f2a95 --- /dev/null +++ b/generic/etc/init/network-interface.conf @@ -0,0 +1,19 @@ +# network-interface - configure network device +# +# This service causes network devices to be brought up or down as a result +# of hardware being added or removed, including that which isn't ordinarily +# removable. + +description "configure network device" + +start on net-device-added +stop on net-device-removed INTERFACE=$INTERFACE + +instance $INTERFACE + +pre-start script + mkdir -p /var/run/network + exec ifup --allow auto $INTERFACE +end script + +post-stop exec ifdown --allow auto $INTERFACE diff --git a/generic/etc/init/networking.conf b/generic/etc/init/networking.conf new file mode 100644 index 000000000..de573ea79 --- /dev/null +++ b/generic/etc/init/networking.conf @@ -0,0 +1,14 @@ +# networking - configure virtual network devices +# +# This task causes virtual network devices that do not have an associated +# kernel object to be started on boot. + +description "configure virtual network devices" + +start on (filesystem and stopped udevtrigger) + +task + +pre-start exec mkdir -p /var/run/network + +exec ifup -a diff --git a/generic/etc/init/rc.conf b/generic/etc/init/rc.conf new file mode 100644 index 000000000..91a331a45 --- /dev/null +++ b/generic/etc/init/rc.conf @@ -0,0 +1,18 @@ +# rc - System V runlevel compatibility +# +# This task runs the old System V-style rc script when changing between +# runlevels. + +description "System V runlevel compatibility" +author "Scott James Remnant <scott@netsplit.com>" + +start on runlevel [0123456] +stop on runlevel [!$RUNLEVEL] + +export RUNLEVEL +export PREVLEVEL + +task + +console output +exec /etc/init.d/rc $RUNLEVEL diff --git a/generic/etc/init/rcS.conf b/generic/etc/init/rcS.conf new file mode 100644 index 000000000..7da72107e --- /dev/null +++ b/generic/etc/init/rcS.conf @@ -0,0 +1,26 @@ +# rcS - System V single-user mode compatibility +# +# This task handles the old System V-style single-user mode, this is +# distinct from the other runlevels since running the rc script would +# be bad. + +description "System V single-user mode compatibility" +author "Scott James Remnant <scott@netsplit.com>" + +start on runlevel S +stop on runlevel [!S] + +console owner +exec /sbin/sulogin + +post-stop script + # Don't switch runlevels if we were stopped by an event, since that + # means we're already switching runlevels + if [ -n "${UPSTART_STOP_EVENTS}" ] + then + exit 0 + fi + + # Switch, passing a magic flag + start --no-wait rc-sysinit FROM_SINGLE_USER_MODE=y +end script diff --git a/generic/etc/init/syslogd.conf b/generic/etc/init/syslogd.conf new file mode 100644 index 000000000..a56a144aa --- /dev/null +++ b/generic/etc/init/syslogd.conf @@ -0,0 +1,14 @@ +# rsyslog - system logging daemon +# +# rsyslog is an enhanced multi-threaded replacement for the traditional +# syslog daemon, logging messages from applications + +description "system logging daemon" + +start on filesystem +stop on runlevel [06] + +expect fork +respawn + +exec syslogd diff --git a/generic/etc/init/ttyS.conf b/generic/etc/init/ttyS.conf new file mode 100644 index 000000000..46a9d85b1 --- /dev/null +++ b/generic/etc/init/ttyS.conf @@ -0,0 +1,9 @@ +# ttyS - getty +# +# This service maintains a getty on tty1 from the point the system is +# started until it is shut down again. + +start on (filesystem and started udev and stopped udev-finish) + +respawn +exec /sbin/getty -L @SPEED@ @CONSOLE@ vt100 |