summaryrefslogtreecommitdiff
path: root/cleopatre
diff options
context:
space:
mode:
authorsave2009-11-12 16:04:45 +0000
committersave2009-11-12 16:04:45 +0000
commit4c2f21c7f94bff2046c790ca972740a0f162aed5 (patch)
treeeccb2aec0409694014f4bb62c5b802f70253529e /cleopatre
parent46746aa7fe099c9037dda3fe0dd6f54c10441092 (diff)
cleo/buildroot: add forgotten init.d files for spk300g_eoc platform
git-svn-id: svn+ssh://pessac/svn/cesar/trunk@6374 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'cleopatre')
-rwxr-xr-xcleopatre/buildroot/target/device/Spidcom/spk300g_eoc/target_skeleton/etc/init.d/S20urandom54
-rwxr-xr-xcleopatre/buildroot/target/device/Spidcom/spk300g_eoc/target_skeleton/etc/init.d/S30plc57
-rwxr-xr-xcleopatre/buildroot/target/device/Spidcom/spk300g_eoc/target_skeleton/etc/init.d/S40network37
-rwxr-xr-xcleopatre/buildroot/target/device/Spidcom/spk300g_eoc/target_skeleton/etc/init.d/S50plcpost46
-rwxr-xr-xcleopatre/buildroot/target/device/Spidcom/spk300g_eoc/target_skeleton/etc/init.d/S80telnetd41
-rwxr-xr-xcleopatre/buildroot/target/device/Spidcom/spk300g_eoc/target_skeleton/etc/init.d/rcS27
6 files changed, 262 insertions, 0 deletions
diff --git a/cleopatre/buildroot/target/device/Spidcom/spk300g_eoc/target_skeleton/etc/init.d/S20urandom b/cleopatre/buildroot/target/device/Spidcom/spk300g_eoc/target_skeleton/etc/init.d/S20urandom
new file mode 100755
index 0000000000..f73cea59ed
--- /dev/null
+++ b/cleopatre/buildroot/target/device/Spidcom/spk300g_eoc/target_skeleton/etc/init.d/S20urandom
@@ -0,0 +1,54 @@
+#! /bin/sh
+#
+# urandom This script saves the random seed between reboots.
+# It is called from the boot, halt and reboot scripts.
+#
+# Version: @(#)urandom 1.33 22-Jun-1998 miquels@cistron.nl
+#
+
+[ -c /dev/urandom ] || exit 0
+#. /etc/default/rcS
+
+case "$1" in
+ start|"")
+ if [ "$VERBOSE" != no ]
+ then
+ echo -n "Initializing random number generator... "
+ fi
+ # Load and then save 512 bytes,
+ # which is the size of the entropy pool
+ if [ -f /etc/random-seed ]
+ then
+ cat /etc/random-seed >/dev/urandom
+ fi
+ # check for read only file system
+ if ! touch /etc/random-seed 2>/dev/null
+ then
+ echo "read-only file system detected...done"
+ exit
+ fi
+ rm -f /etc/random-seed
+ umask 077
+ dd if=/dev/urandom of=/etc/random-seed count=1 \
+ >/dev/null 2>&1 || echo "urandom start: failed."
+ umask 022
+ [ "$VERBOSE" != no ] && echo "done."
+ ;;
+ stop)
+ if ! touch /etc/random-seed 2>/dev/null
+ then
+ exit
+ fi
+ # Carry a random seed from shut-down to start-up;
+ # see documentation in linux/drivers/char/random.c
+ [ "$VERBOSE" != no ] && echo -n "Saving random seed... "
+ umask 077
+ dd if=/dev/urandom of=/etc/random-seed count=1 \
+ >/dev/null 2>&1 || echo "urandom stop: failed."
+ [ "$VERBOSE" != no ] && echo "done."
+ ;;
+ *)
+ echo "Usage: urandom {start|stop}" >&2
+ exit 1
+ ;;
+esac
diff --git a/cleopatre/buildroot/target/device/Spidcom/spk300g_eoc/target_skeleton/etc/init.d/S30plc b/cleopatre/buildroot/target/device/Spidcom/spk300g_eoc/target_skeleton/etc/init.d/S30plc
new file mode 100755
index 0000000000..861be30615
--- /dev/null
+++ b/cleopatre/buildroot/target/device/Spidcom/spk300g_eoc/target_skeleton/etc/init.d/S30plc
@@ -0,0 +1,57 @@
+#!/bin/sh
+#
+# Start the plc layer....
+#
+
+start() {
+ OPTIONS=""
+ plcdrv="/lib/modules/plcdrv.ko"
+ plcfw="/lib/modules/plcdrv.rom"
+ if [ -e /etc/plcdrv.conf ]; then
+ source /etc/plcdrv.conf
+ fi
+ echo "Loading PLC driver..."
+ if [ -e /usr/local/$plcdrv ]; then
+ insmod /usr/local/$plcdrv $OPTIONS
+ else
+ insmod $plcdrv $OPTIONS
+ fi
+ /bin/mknod /dev/plcdrv c 254 0
+ /bin/chmod 666 /dev/plcdrv
+ echo "Loading PLC firmware..."
+ if [ -e /usr/local$plcfw ] ; then
+ dd if=/usr/local/$plcfw of=/dev/plcdrv
+ else
+ dd if=$plcfw of=/dev/plcdrv
+ fi
+}
+
+stop() {
+ echo -n "Unloading PLC driver..."
+ /sbin/rmmod plcdrv || exit 1
+ rm -f /dev/plcdrv
+}
+
+restart() {
+ stop
+ start
+}
+
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart|reload)
+ restart
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|restart}"
+ exit 1
+esac
+
+exit $?
+
+#
diff --git a/cleopatre/buildroot/target/device/Spidcom/spk300g_eoc/target_skeleton/etc/init.d/S40network b/cleopatre/buildroot/target/device/Spidcom/spk300g_eoc/target_skeleton/etc/init.d/S40network
new file mode 100755
index 0000000000..311d0809dd
--- /dev/null
+++ b/cleopatre/buildroot/target/device/Spidcom/spk300g_eoc/target_skeleton/etc/init.d/S40network
@@ -0,0 +1,37 @@
+#!/bin/sh
+#
+# Start the network....
+#
+
+start() {
+ echo "Starting network..."
+ /sbin/ifup -a
+}
+
+stop() {
+ echo -n "Stopping network..."
+ /sbin/ifdown -a
+}
+
+restart() {
+ stop
+ start
+}
+
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart|reload)
+ restart
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|restart}"
+ exit 1
+esac
+
+exit $?
+
diff --git a/cleopatre/buildroot/target/device/Spidcom/spk300g_eoc/target_skeleton/etc/init.d/S50plcpost b/cleopatre/buildroot/target/device/Spidcom/spk300g_eoc/target_skeleton/etc/init.d/S50plcpost
new file mode 100755
index 0000000000..c229afaf2c
--- /dev/null
+++ b/cleopatre/buildroot/target/device/Spidcom/spk300g_eoc/target_skeleton/etc/init.d/S50plcpost
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+#
+# Start the plc user utilities...
+#
+
+start() {
+ echo "Starting plcd..."
+ /usr/sbin/plcd &
+
+ if [ -e /usr/sbin/managerd ] ; then
+ echo "Starting managerd..."
+ managerd &
+ fi
+}
+
+stop() {
+ echo -n "Stopping managerd..."
+ killall managerd
+ echo -n "Stopping plcd..."
+ killall plcd
+}
+
+restart() {
+ stop
+ start
+}
+
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart|reload)
+ restart
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|restart}"
+ exit 1
+esac
+
+exit $?
+
+#
diff --git a/cleopatre/buildroot/target/device/Spidcom/spk300g_eoc/target_skeleton/etc/init.d/S80telnetd b/cleopatre/buildroot/target/device/Spidcom/spk300g_eoc/target_skeleton/etc/init.d/S80telnetd
new file mode 100755
index 0000000000..f4e368693f
--- /dev/null
+++ b/cleopatre/buildroot/target/device/Spidcom/spk300g_eoc/target_skeleton/etc/init.d/S80telnetd
@@ -0,0 +1,41 @@
+#!/bin/sh
+#
+# Start the telnet daemon....
+#
+
+start() {
+ echo "Starting Telnet Daemon..."
+ if [ -f /usr/sbin/telnetd ]
+ then
+ /usr/sbin/telnetd
+ fi
+}
+stop() {
+ echo "Stopping Telnet Daemon..."
+ if [ -f /usr/sbin/telnetd ]
+ then
+ killall telnetd
+ fi
+}
+restart() {
+ stop
+ start
+}
+
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart|reload)
+ restart
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|restart}"
+ exit 1
+esac
+
+exit $?
+
diff --git a/cleopatre/buildroot/target/device/Spidcom/spk300g_eoc/target_skeleton/etc/init.d/rcS b/cleopatre/buildroot/target/device/Spidcom/spk300g_eoc/target_skeleton/etc/init.d/rcS
new file mode 100755
index 0000000000..de411534da
--- /dev/null
+++ b/cleopatre/buildroot/target/device/Spidcom/spk300g_eoc/target_skeleton/etc/init.d/rcS
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+
+# Start all init scripts in /etc/init.d
+# executing them in numerical order.
+#
+for i in /etc/init.d/S??* ;do
+
+ # Ignore dangling symlinks (if any).
+ [ ! -f "$i" ] && continue
+
+ case "$i" in
+ *.sh)
+ # Source shell script for speed.
+ (
+ trap - INT QUIT TSTP
+ set start
+ . $i
+ )
+ ;;
+ *)
+ # No sh extension, so fork subprocess.
+ $i start
+ ;;
+ esac
+done
+