#!/bin/bash export PATH=/bin:/sbin service () { while true; do $@ sleep 1 done & } #mount system pseudo filesystems mount -t proc proc /proc mount -t sysfs sys /sys mount -t devtmpfs dev /dev mkdir /dev/pts mount -t devpts devpts /dev/pts #launch the netlink to mdev bridge service service /usr/sbin/nl2mdev #load any modules specified in /etc/modprobe.d/* if [ $(ls /etc/modprobe.d/ | wc --lines) -gt 0 ]; then for module in /etc/modprobe.d/*; do modprobe $(< $module ) done fi #alternate module config info if [ $(ls /etc/modules-load.d/*.conf | wc --lines) -gt 0 ]; then cat /etc/modules-load.d/*.conf | xargs -i{} modprobe {} fi #rescan for device changes mdev -s #mount anything specified in /etc/fstab mount -a #set hostname hostname $(< /etc/hostname ) #initialize serial port stty -F /dev/ttyAMA0 sane #network setup and network dependent services ( ifconfig lo up 127.0.0.1 ifconfig eth0 up ifconfig eth0:0 up 192.168.10.1 #launch network-dependent services here service /usr/sbin/sshd -D ) & #other services service /sbin/agetty --noclear tty1 linux service /sbin/agetty ttyAMA0 115200 vt100 service /usr/bin/crond -n wait #done booting!