se505-buildsystem/stage2.skel/etc/init.d/rcS

47 lines
744 B
Bash
Executable File

#!/bin/sh
echo "un-mounting flash"
umount /initrd/proc
umount /initrd/dev
umount /initrd
echo "remount / writeable"
mount -o remount,rw,noatime /
echo "mounting remaining filesystems"
mount -a
echo "starting syslogd"
klogd
syslogd -m 0
echo "setting up loopback"
ifconfig lo 127.0.0.1 up
route add -net 127.0.0.0 netmask 255.0.0.0 dev lo
# source config
. /etc/rc.conf
if [ -n $HOSTNAME ]; then
/bin/hostname $HOSTNAME
fi
# start init scripts
for i in /etc/init.d/S??*; do
# skip symlinks
[ ! -f $i ] && continue;
case "$i" in
*.sh) # source shellscript for speed
trap - INT QUIT TSTP
set start
. $i
;;
*) # no shell, fork
$i start
;;
esac
done
echo "System startup completed"