fs

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

commit 9781a149a1af687fcefe1ac9536ec1e0c4ba8f9a
parent 56bac5a6486ff527e5aa29afe7ee7cc730082385
Author: sin <sin@2f30.org>
Date:   Wed Feb  5 16:50:25 +0000

Remove inittab and rename rc.boot to rc

Diffstat:
etc/inittab | 12------------
etc/rc | 62++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
etc/rc.boot | 62--------------------------------------------------------------
etc/rc.multi | 2++
4 files changed, 64 insertions(+), 74 deletions(-)
diff --git a/etc/inittab b/etc/inittab @@ -1,12 +0,0 @@ -# Note that busybox uses a non-standard inittab. - -::sysinit:/etc/rc.boot - -tty1::respawn:/bin/getty 38400 tty1 linux -tty2::respawn:/bin/getty 38400 tty2 linux -tty3::respawn:/bin/getty 38400 tty3 linux -tty4::respawn:/bin/getty 38400 tty4 linux - -::ctrlaltdel:/bin/busybox reboot -d 3 -::restart:/bin/busybox init -::shutdown:/etc/rc.shutdown diff --git a/etc/rc b/etc/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 +/etc/rc.multi diff --git a/etc/rc.boot b/etc/rc.boot @@ -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 @@ -15,3 +15,5 @@ done echo Running rc.local [ -x /etc/rc.local ] && /etc/rc.local + +while :; do getty 38400 tty1 linux; done