commit bc7a883776a4935401aa5f27efc621c0bf0e914a
parent 9dcb3f886c703004b1cb02e597b047549bdc7263
Author: sin <sin@2f30.org>
Date: Wed, 5 Feb 2014 18:25:02 +0000
Move rc scripts over to /bin
/etc should not have executable files in it.
Diffstat:
9 files changed, 117 insertions(+), 117 deletions(-)
diff --git a/bin/rc b/bin/rc
@@ -0,0 +1,62 @@
+#!/bin/sh
+
+. /etc/rc.conf
+
+echo
+echo
+echo " Morpheus booting"
+echo
+echo
+
+echo Mounting filesystems
+mkdir -p /dev/pts /dev/shm
+mkdir -p /sys
+mkdir -p /proc
+mount -n -t proc proc /proc
+mount -n -t sysfs sysfs /sys
+mount -n -t devpts devpts /dev/pts
+
+grep -q " verbose" /proc/cmdline && dmesg -n 8 || dmesg -n 3
+
+echo Running smdev
+smdev -s
+
+echo Setting smdev as the kernel hotplug
+echo /bin/smdev > /proc/sys/kernel/hotplug
+
+echo "Setting hostname to $HOSTNAME"
+hostname $HOSTNAME
+
+echo Bringing up the lo interface
+ifconfig lo up
+
+HWCLOCK_PARAMS="-s"
+case $HARDWARECLOCK in
+ "")
+ ;;
+ UTC)
+ HWCLOCK_PARAMS="${HWCLOCK_PARAMS} -u"
+ ;;
+ localtime)
+ HWCLOCK_PARAMS="${HWCLOCK_PARAMS} -l"
+ ;;
+ *)
+ HWCLOCK_PARAMS=""
+ ;;
+esac
+
+if [ -n "$HWCLOCK_PARAMS" ]; then
+ echo Setting hwclock
+ [ -n "$TIMEZONE" ] && export TZ="$TIMEZONE"
+ hwclock $HWCLOCK_PARAMS
+ unset TZ
+fi
+
+echo Setting random seed
+[ -f /etc/random-seed ] && cat /etc/random-seed >/dev/urandom
+dd if=/dev/urandom of=/etc/random-seed count=1 bs=512 2>/dev/null
+
+dmesg > /var/log/dmesg.log
+
+echo Running rc.multi
+/bin/rc.multi
diff --git a/etc/rc.d/dropbear b/bin/rc.d/dropbear
diff --git a/etc/rc.d/network b/bin/rc.d/network
diff --git a/etc/rc.local b/bin/rc.local
diff --git a/bin/rc.multi b/bin/rc.multi
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+. /etc/rc.conf
+
+if [ -x /etc/dropbearkeys ]; then
+ echo Generating dropbear keys
+ /etc/dropbearkeys
+fi
+chmod 644 /etc/dropbearkeys
+
+for s in $SVC; do
+ echo Starting $s
+ /bin/rc.d/$s -s
+done
+
+echo Running rc.local
+[ -x /bin/rc.local ] && /bin/rc.local
+
+while :; do getty 38400 tty1 linux; done
diff --git a/bin/rc.shutdown b/bin/rc.shutdown
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+PATH=/bin
+
+. /etc/rc.conf
+
+echo Shutting down
+
+hwclock -u -w
+
+echo $SVC | sed 's/ /\n/g' | tac | while read s; do
+ echo Stopping $s
+ /bin/rc.d/$s -k
+done
+
+killall5 -15
+sleep 5
+killall5 -9
+
+echo Storing random seed
+dd if=/dev/urandom of=/etc/random-seed count=1 bs=512 2>/dev/null
+
+echo Mounting root read-only
+mount -o remount,ro /
+
+sync
+sleep 3
+wait
+
+echo bye
+
+if test "$1" = "reboot"; then
+ halt -r
+else
+ halt -p
+fi
diff --git a/etc/rc b/etc/rc
@@ -1,62 +0,0 @@
-#!/bin/sh
-
-. /etc/rc.conf
-
-echo
-echo
-echo " Morpheus booting"
-echo
-echo
-
-echo Mounting filesystems
-mkdir -p /dev/pts /dev/shm
-mkdir -p /sys
-mkdir -p /proc
-mount -n -t proc proc /proc
-mount -n -t sysfs sysfs /sys
-mount -n -t devpts devpts /dev/pts
-
-grep -q " verbose" /proc/cmdline && dmesg -n 8 || dmesg -n 3
-
-echo Running smdev
-smdev -s
-
-echo Setting smdev as the kernel hotplug
-echo /bin/smdev > /proc/sys/kernel/hotplug
-
-echo "Setting hostname to $HOSTNAME"
-hostname $HOSTNAME
-
-echo Bringing up the lo interface
-ifconfig lo up
-
-HWCLOCK_PARAMS="-s"
-case $HARDWARECLOCK in
- "")
- ;;
- UTC)
- HWCLOCK_PARAMS="${HWCLOCK_PARAMS} -u"
- ;;
- localtime)
- HWCLOCK_PARAMS="${HWCLOCK_PARAMS} -l"
- ;;
- *)
- HWCLOCK_PARAMS=""
- ;;
-esac
-
-if [ -n "$HWCLOCK_PARAMS" ]; then
- echo Setting hwclock
- [ -n "$TIMEZONE" ] && export TZ="$TIMEZONE"
- hwclock $HWCLOCK_PARAMS
- unset TZ
-fi
-
-echo Setting random seed
-[ -f /etc/random-seed ] && cat /etc/random-seed >/dev/urandom
-dd if=/dev/urandom of=/etc/random-seed count=1 bs=512 2>/dev/null
-
-dmesg > /var/log/dmesg.log
-
-echo Running rc.multi
-/etc/rc.multi
diff --git a/etc/rc.multi b/etc/rc.multi
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-. /etc/rc.conf
-
-if [ -x /etc/dropbearkeys ]; then
- echo Generating dropbear keys
- /etc/dropbearkeys
-fi
-chmod 644 /etc/dropbearkeys
-
-for s in $SVC; do
- echo Starting $s
- /etc/rc.d/$s -s
-done
-
-echo Running rc.local
-[ -x /etc/rc.local ] && /etc/rc.local
-
-while :; do getty 38400 tty1 linux; done
diff --git a/etc/rc.shutdown b/etc/rc.shutdown
@@ -1,36 +0,0 @@
-#!/bin/sh
-
-PATH=/bin
-
-. /etc/rc.conf
-
-echo Shutting down
-
-hwclock -u -w
-
-echo $SVC | sed 's/ /\n/g' | tac | while read s; do
- echo Stopping $s
- /etc/rc.d/$s -k
-done
-
-killall5 -15
-sleep 5
-killall5 -9
-
-echo Storing random seed
-dd if=/dev/urandom of=/etc/random-seed count=1 bs=512 2>/dev/null
-
-echo Mounting root read-only
-mount -o remount,ro /
-
-sync
-sleep 3
-wait
-
-echo bye
-
-if test "$1" = "reboot"; then
- halt -r
-else
- halt -p
-fi