summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsrc.etc/init.d/hostname13
-rwxr-xr-xsrc.etc/init.d/httpd22
-rwxr-xr-xsrc.etc/init.d/mdev19
-rwxr-xr-xsrc.etc/init.d/networking25
-rwxr-xr-xsrc.etc/init.d/syslog31
-rwxr-xr-xsrc.etc/init.d/telnetd22
6 files changed, 132 insertions, 0 deletions
diff --git a/src.etc/init.d/hostname b/src.etc/init.d/hostname
new file mode 100755
index 0000000..aec1102
--- /dev/null
+++ b/src.etc/init.d/hostname
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+case "${1}" in
+ start)
+ printf 'Setting hostname... '
+ [ -f /etc/hostname ] && hostname -F /etc/hostname || hostname none
+ printf 'done.\n'
+ ;;
+ *)
+ printf 'Usage: %s start\n' "${0}" >&2
+ exit 1
+ ;;
+esac
diff --git a/src.etc/init.d/httpd b/src.etc/init.d/httpd
new file mode 100755
index 0000000..6a3045d
--- /dev/null
+++ b/src.etc/init.d/httpd
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+case "${1}" in
+ start)
+ printf 'Starting httpd...'
+ start-stop-daemon -S -q -n httpd -x httpd -- -h /var/www
+ printf 'done.'
+ ;;
+ stop)
+ printf 'Stopping httpd... '
+ start-stop-daemon -K -q -n httpd
+ printf 'done.'
+ ;;
+ restart)
+ "${0}" stop
+ "${0}" start
+ ;;
+ *)
+ printf 'Usage: %s {start|stop|restart}\n' "${0}"
+ exit 1
+ ;;
+esac
diff --git a/src.etc/init.d/mdev b/src.etc/init.d/mdev
new file mode 100755
index 0000000..66070f8
--- /dev/null
+++ b/src.etc/init.d/mdev
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+case "${1}" in
+ start)
+ printf 'Enabling device hotplugging... '
+ echo '/sbin/mdev' > /proc/sys/kernel/hotplug
+ mdev -s
+ printf 'done.\n'
+ ;;
+ stop)
+ printf 'Disabling device hotplugging... '
+ echo '' > /proc/sys/kernel/hotplug
+ printf 'done.\n'
+ ;;
+ *)
+ printf 'Usage: %s {start|stop}\n' "${0}" >&2
+ exit 1
+ ;;
+esac
diff --git a/src.etc/init.d/networking b/src.etc/init.d/networking
new file mode 100755
index 0000000..12fb513
--- /dev/null
+++ b/src.etc/init.d/networking
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+case "${1}" in
+ start)
+ printf 'Configuring network interfaces... '
+ ifdown -a > /dev/null 2>&1
+ ifup -a
+ printf 'done.\n'
+ ;;
+ stop)
+ printf 'Deconfiguring network interfaces... '
+ ifdown -a
+ printf 'done.\n'
+ ;;
+ restart)
+ printf 'Reconfiguring network interfaces... '
+ ifdown -a
+ ifup -a
+ printf 'done.\n'
+ ;;
+ *)
+ printf 'Usage: %s {start|stop|restart}\n' "${0}" >&2
+ exit 1
+ ;;
+esac
diff --git a/src.etc/init.d/syslog b/src.etc/init.d/syslog
new file mode 100755
index 0000000..082f9bf
--- /dev/null
+++ b/src.etc/init.d/syslog
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+SYSLOG_ROTATE_SIZE=65536
+
+case "${1}" in
+ start)
+ printf 'Starting syslog... '
+ start-stop-daemon -S -q -n syslogd -x syslogd -- \
+ -s "${SYSLOG_ROTATE_SIZE}"
+ printf 'done.'
+ printf 'Starting klogd... '
+ start-stop-daemon -S -q -n klogd -x klogd
+ printf 'done.'
+ ;;
+ stop)
+ printf 'Stopping klogd... '
+ start-stop-daemon -K -q -n klogd
+ printf 'done.'
+ printf 'Stopping syslog... '
+ start-stop-daemon -K -q -n syslogd
+ printf 'done.'
+ ;;
+ restart)
+ "${0}" stop
+ "${0}" start
+ ;;
+ *)
+ printf 'Usage: %s {start|stop|restart}\n' "${0}"
+ exit 1
+ ;;
+esac
diff --git a/src.etc/init.d/telnetd b/src.etc/init.d/telnetd
new file mode 100755
index 0000000..be9043b
--- /dev/null
+++ b/src.etc/init.d/telnetd
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+case "${1}" in
+ start)
+ printf 'Starting telnetd...'
+ start-stop-daemon -S -q -n telnetd -x telnetd
+ printf 'done.'
+ ;;
+ stop)
+ printf 'Stopping telnetd... '
+ start-stop-daemon -K -q -n telnetd
+ printf 'done.'
+ ;;
+ restart)
+ "${0}" stop
+ "${0}" start
+ ;;
+ *)
+ printf 'Usage: %s {start|stop|restart}\n' "${0}"
+ exit 1
+ ;;
+esac