#!/bin/sh # if [ "$1" = "prereqs" ]; then exit 0 fi quiet=n . /scripts/functions . /conf/tcos.conf . /conf/tcos-run-functions # stop PULSATE [ -x /sbin/usplash_write ] && grep -q " splash " /proc/cmdline && usplash_write "PROGRESS 0" >/dev/null 2>&1 # set kernel very silent if grep -q quiet /proc/cmdline ; then echo "1 1 1 7" > /proc/sys/kernel/printk dmesg -n 1 fi # start syslogd (busybox embeded) killall syslogd 2>/dev/null syslogd 2>/dev/null if [ $? != 0 ]; then # create a fuck logger rm -f /bin/logger cat << EOF > /bin/logger #!/bin/sh echo "[\$(date +'%d/%m/%y %H:%M:%S')] \$2: \$3" >> /var/log/messages EOF chmod +x /bin/logger fi # hack for ubuntu old udev while [ 1 ]; do [ -d /sys/class/net/eth0 ] && break [ -d /sys/class/net/eth1 ] && break [ -d /sys/class/net/eth2 ] && break [ -d /sys/class/net/wlan0 ] && break [ -d /sys/class/net/wlan1 ] && break [ -d /sys/class/net/ra0 ] && break [ -d /sys/class/net/ra1 ] && break [ -x /sbin/udevtrigger ] && /sbin/udevtrigger [ -x /sbin/udevplug ] && /sbin/udevplug [ -x /sbin/udevadm ] && /sbin/udevadm trigger [ -x /sbin/udevadm ] && /sbin/udevadm settle if [ ! -e /tmp/waiting_for_net ]; then echo -n " * Waiting for net device " fi touch /tmp/waiting_for_net echo -n "." sleep 1 done modprobe -q loop >> /tmp/initramfs.debug 2>&1 modprobe -q squashfs >> /tmp/initramfs.debug 2>&1 # network and nfs modprobe nfs 2>/dev/null modprobe af_packet 2>/dev/null if [ ! -z "$TCOS_DISABLE_IDE" ]; then # load cdrom and HDD modules modprobe -q ide_disk >> /tmp/initramfs.debug 2>&1 & modprobe -q ide_cd >> /tmp/initramfs.debug 2>&1 & fi # from > 2.6.26 we need to load aufs module (unionfs is deprecated) # TCOS_UNIONFS is generated in hooks-addons/99tcos and saved in /conf/tcos.conf if [ "$TCOS_UNIONFS" = "aufs" ]; then _log "BUSYBOX load aufs module" modprobe -q aufs >> /tmp/initramfs.debug 2>&1 & else if [ "$(read_cmdline_var "aufs" "0")" = "1" ] && [ $(modprobe aufs -q ; echo $?) != 1 ]; then _log "BUSYBOX loaded aufs module" modprobe -q aufs >> /tmp/initramfs.debug 2>&1 & else _log "BUSYBOX load unionfs module and if fail try aufs" modprobe unionfs || modprobe aufs >> /tmp/initramfs.debug 2>&1 & fi fi exit 0