fs

morpheus filesystem files
git clone git://git.2f30.org/fs.git
Log | Files | Refs

commit 1d08ab152c12fb6b1702032c0189c8346b83d7fc
parent bc7a883776a4935401aa5f27efc621c0bf0e914a
Author: sin <sin@2f30.org>
Date:   Thu Feb  6 11:37:25 +0000

Rename rc -> rc.init and rc.multi -> rc.svc

Diffstat:
bin/rc | 62--------------------------------------------------------------
bin/rc.init | 62++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
bin/rc.multi | 19-------------------
bin/rc.svc | 19+++++++++++++++++++
4 files changed, 81 insertions(+), 81 deletions(-)
diff --git a/bin/rc b/bin/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 -/bin/rc.multi diff --git a/bin/rc.init b/bin/rc.init @@ -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.svc +/bin/rc.svc diff --git a/bin/rc.multi b/bin/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 - /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.svc b/bin/rc.svc @@ -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