summaryrefslogtreecommitdiff
path: root/packages/openslug-init/openslug-init-0.10/initscripts
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2005-06-30 08:19:37 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2005-06-30 08:19:37 +0000
commitc8e5702127e507e82e6f68a4b8c546803accea9d (patch)
tree00583491f40ecc640f2b28452af995e3a63a09d7 /packages/openslug-init/openslug-init-0.10/initscripts
parent87ec8ca4d2e2eb4d1c1e1e1a6b46a395d56805b9 (diff)
import clean BK tree at cset 1.3670
Diffstat (limited to 'packages/openslug-init/openslug-init-0.10/initscripts')
-rw-r--r--packages/openslug-init/openslug-init-0.10/initscripts/.mtn2git_empty0
-rwxr-xr-x[-rw-r--r--]packages/openslug-init/openslug-init-0.10/initscripts/leds_startup11
-rwxr-xr-x[-rw-r--r--]packages/openslug-init/openslug-init-0.10/initscripts/rmrecovery4
-rw-r--r--packages/openslug-init/openslug-init-0.10/initscripts/syslog.buffer23
-rw-r--r--packages/openslug-init/openslug-init-0.10/initscripts/syslog.file23
-rw-r--r--packages/openslug-init/openslug-init-0.10/initscripts/syslog.network28
-rw-r--r--packages/openslug-init/openslug-init-0.10/initscripts/umountinitrd.sh5
-rw-r--r--packages/openslug-init/openslug-init-0.10/initscripts/zleds38
8 files changed, 132 insertions, 0 deletions
diff --git a/packages/openslug-init/openslug-init-0.10/initscripts/.mtn2git_empty b/packages/openslug-init/openslug-init-0.10/initscripts/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/openslug-init/openslug-init-0.10/initscripts/.mtn2git_empty
diff --git a/packages/openslug-init/openslug-init-0.10/initscripts/leds_startup b/packages/openslug-init/openslug-init-0.10/initscripts/leds_startup
index e69de29bb2..945d75bd02 100644..100755
--- a/packages/openslug-init/openslug-init-0.10/initscripts/leds_startup
+++ b/packages/openslug-init/openslug-init-0.10/initscripts/leds_startup
@@ -0,0 +1,11 @@
+#!/bin/sh
+# Bug fix: during the initial boot sysvinit sets PREVLEVEL to
+# nothing in rcS and to 'N' in the transition from rcS to the
+# user state. This script runs on that transition and, if
+# the PREVLEVEL is 'N', sets 'previous' (as in /etc/init.d/rc)
+# to 'S'
+if test "$PREVLEVEL" = N
+then
+ previous=S exec /etc/init.d/zleds stop
+fi
+exit 0
diff --git a/packages/openslug-init/openslug-init-0.10/initscripts/rmrecovery b/packages/openslug-init/openslug-init-0.10/initscripts/rmrecovery
index e69de29bb2..eec822b154 100644..100755
--- a/packages/openslug-init/openslug-init-0.10/initscripts/rmrecovery
+++ b/packages/openslug-init/openslug-init-0.10/initscripts/rmrecovery
@@ -0,0 +1,4 @@
+#!/bin/sh
+# Run to remove /.recovery if the boot seems to have succeeded
+test -e /.recovery && rm -f /.recovery
+exit 0
diff --git a/packages/openslug-init/openslug-init-0.10/initscripts/syslog.buffer b/packages/openslug-init/openslug-init-0.10/initscripts/syslog.buffer
index e69de29bb2..9285c02946 100644
--- a/packages/openslug-init/openslug-init-0.10/initscripts/syslog.buffer
+++ b/packages/openslug-init/openslug-init-0.10/initscripts/syslog.buffer
@@ -0,0 +1,23 @@
+#!/bin/sh
+#
+# Invoke the syslog startup if the configuration
+# uses (only) 'buffer' as the DESTINATION
+DESTINATION=
+test -f /etc/syslog.conf && . /etc/syslog.conf
+doit=
+
+for d in $DESTINATION
+do
+ case "$d" in
+ buffer) doit=1;;
+ file) exit 0;;
+ remote) exit 0;;
+ *) echo "/etc/syslog.conf: $d: unknown destination" >&2
+ exit 1;;
+ esac
+done
+
+test -n "$doit" -a -x /etc/init.d/syslog &&
+ exec /etc/init.d/syslog "$@"
+
+exit 0
diff --git a/packages/openslug-init/openslug-init-0.10/initscripts/syslog.file b/packages/openslug-init/openslug-init-0.10/initscripts/syslog.file
index e69de29bb2..80ee5f0174 100644
--- a/packages/openslug-init/openslug-init-0.10/initscripts/syslog.file
+++ b/packages/openslug-init/openslug-init-0.10/initscripts/syslog.file
@@ -0,0 +1,23 @@
+#!/bin/sh
+#
+# Invoke the syslog startup if the configuration
+# uses 'file' (and, optionally, buffer) as the DESTINATION
+DESTINATION=
+test -f /etc/syslog.conf && . /etc/syslog.conf
+doit=
+
+for d in $DESTINATION
+do
+ case "$d" in
+ buffer) :;;
+ file) doit=1;;
+ remote) exit 0;;
+ *) echo "/etc/syslog.conf: $d: unknown destination" >&2
+ exit 1;;
+ esac
+done
+
+test -n "$doit" -a -x /etc/init.d/syslog &&
+ exec /etc/init.d/syslog "$@"
+
+exit 0
diff --git a/packages/openslug-init/openslug-init-0.10/initscripts/syslog.network b/packages/openslug-init/openslug-init-0.10/initscripts/syslog.network
index e69de29bb2..3d7f4ab8e6 100644
--- a/packages/openslug-init/openslug-init-0.10/initscripts/syslog.network
+++ b/packages/openslug-init/openslug-init-0.10/initscripts/syslog.network
@@ -0,0 +1,28 @@
+#!/bin/sh
+#
+# Invoke the syslog startup if the configuration
+# uses 'remote', or doesn't use 'buffer' or 'file'
+DESTINATION=
+test -f /etc/syslog.conf && . /etc/syslog.conf
+doit=
+doneit=
+
+for d in $DESTINATION
+do
+ case "$d" in
+ buffer) doneit=1;;
+ file) doneit=1;;
+ remote) doit=1;;
+ *) doit=1
+ echo "/etc/syslog.conf: $d: unknown destination" >&2
+ exit 1;;
+ esac
+done
+
+# One of doneit or doit is set unless the DESTINATION value
+# is empty (which is probably an error), let syslog handle
+# the error.
+test \( -n "$doit" -o -z "$doneit" \) -a -x /etc/init.d/syslog &&
+ exec /etc/init.d/syslog "$@"
+
+exit 0
diff --git a/packages/openslug-init/openslug-init-0.10/initscripts/umountinitrd.sh b/packages/openslug-init/openslug-init-0.10/initscripts/umountinitrd.sh
index e69de29bb2..b7ae8b76e5 100644
--- a/packages/openslug-init/openslug-init-0.10/initscripts/umountinitrd.sh
+++ b/packages/openslug-init/openslug-init-0.10/initscripts/umountinitrd.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+#
+# umount /mnt, which is where the initrd ends up mounted
+# if the directory /initrd is not present
+exec umount /mnt 2>/dev/null
diff --git a/packages/openslug-init/openslug-init-0.10/initscripts/zleds b/packages/openslug-init/openslug-init-0.10/initscripts/zleds
index e69de29bb2..c3ad3d2d64 100644
--- a/packages/openslug-init/openslug-init-0.10/initscripts/zleds
+++ b/packages/openslug-init/openslug-init-0.10/initscripts/zleds
@@ -0,0 +1,38 @@
+#!/bin/sh
+#
+# This script is executed at the start and end of each run-level
+# transition. It is the first 'stop' script and the last 'start'
+# script.
+#
+# 'stop' sets the correct colour power LED to flash between the
+# two colours of the previous and next runlevel.
+# 'start' sets the LED to steady
+#
+# 'red' is the initial setting on kernel boot
+#
+# 'amber' is used for run levels S (from /linuxrc), 0 (halt),
+# 1 (single user) and 6 (reboot). halt and reboot do not
+# terminate therefore the LED remains flashing until the
+# kernel terminates.
+#
+# 'green' is used for run levels 2-5 - the normal user run levels.
+#
+# colours are 'g' (green), 'r' (red) or 'gr' (amber).
+colour() {
+ case "$1" in
+ S|0|1|6) echo gr;;
+ 2|3|4|5) echo g;;
+ N) echo r;;
+ *) echo "led change: $runlevel: runlevel unknown" >&2
+ echo r;;
+ esac
+}
+
+# leds syntax is -A +<init state> /<new state>
+case "$1" in
+start) leds -A +"$(colour "$runlevel")";;
+stop) leds -A +"$(colour "$previous")" /"$(colour "$runlevel")";;
+*) echo "led change: $1: command ignored" >&2;;
+esac
+
+exit 0