summaryrefslogtreecommitdiff
path: root/sources/target_skeleton/etc/init.d
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-04-26 22:01:43 +0000
committerEric Andersen <andersen@codepoet.org>2002-04-26 22:01:43 +0000
commit8262508fc4456b5230216473ea14c897268ba791 (patch)
treed172eebb211e84b023fe70fc14f201745635a7f0 /sources/target_skeleton/etc/init.d
parent085ba9f45190345249c56562bbccf05bc63e1476 (diff)
With this update, everything now works as expected.
-Erik
Diffstat (limited to 'sources/target_skeleton/etc/init.d')
-rwxr-xr-xsources/target_skeleton/etc/init.d/S01mount1
-rwxr-xr-xsources/target_skeleton/etc/init.d/S20syslogd6
-rwxr-xr-xsources/target_skeleton/etc/init.d/S20urandom44
-rwxr-xr-xsources/target_skeleton/etc/init.d/S50networking2
4 files changed, 52 insertions, 1 deletions
diff --git a/sources/target_skeleton/etc/init.d/S01mount b/sources/target_skeleton/etc/init.d/S01mount
index 85d3ab5a6..45d0e7bca 100755
--- a/sources/target_skeleton/etc/init.d/S01mount
+++ b/sources/target_skeleton/etc/init.d/S01mount
@@ -4,6 +4,7 @@
# fsck, since we don't need it here...
echo -n "Mounting local file systems: "
+/bin/mount / -o remount,rw > /dev/null 2>&1
/bin/mount -a > /dev/null 2>&1
if [ $? = 0 ] ; then
echo "ok"
diff --git a/sources/target_skeleton/etc/init.d/S20syslogd b/sources/target_skeleton/etc/init.d/S20syslogd
new file mode 100755
index 000000000..e3b0e7de4
--- /dev/null
+++ b/sources/target_skeleton/etc/init.d/S20syslogd
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+echo -n "Starting system log daemon: "
+# start syslogging
+/sbin/syslogd -m 0
+echo "ok"
diff --git a/sources/target_skeleton/etc/init.d/S20urandom b/sources/target_skeleton/etc/init.d/S20urandom
new file mode 100755
index 000000000..433fafee4
--- /dev/null
+++ b/sources/target_skeleton/etc/init.d/S20urandom
@@ -0,0 +1,44 @@
+#! /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
+ 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)
+ # 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/sources/target_skeleton/etc/init.d/S50networking b/sources/target_skeleton/etc/init.d/S50networking
index 7104f3321..db60359f9 100755
--- a/sources/target_skeleton/etc/init.d/S50networking
+++ b/sources/target_skeleton/etc/init.d/S50networking
@@ -4,4 +4,4 @@
ifconfig lo 127.0.0.1 up
route add -net 127.0.0.0 netmask 255.0.0.0 lo
-hostname dev.null
+hostname -F /etc/hostname