From 2ee1752af50e885e1145c03d5790d60291fc43ab Mon Sep 17 00:00:00 2001 From: Alejandro Mery Date: Mon, 22 Sep 2008 19:46:43 +0000 Subject: [PATCH] initramfs: Added initial rc.sysinit --- initramfs/etc_rc.d_rc.sysinit.sh | 69 ++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 initramfs/etc_rc.d_rc.sysinit.sh diff --git a/initramfs/etc_rc.d_rc.sysinit.sh b/initramfs/etc_rc.d_rc.sysinit.sh new file mode 100644 index 0000000..7093300 --- /dev/null +++ b/initramfs/etc_rc.d_rc.sysinit.sh @@ -0,0 +1,69 @@ +#!/bin/sh +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: target/idunn/initramfs/etc_rc.d_rc.sysinit.sh +# Copyright (C) 2008 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. A copy of the +# GNU General Public License can be found in the file COPYING. +# --- SDE-COPYRIGHT-NOTE-END --- + +. /etc/rc.d/functions.in + +banner "I am Idunn, take an apple and live forever." + +# keep the console clean +[ -x /bin/dmesg ] && /bin/dmesg -n 3 + +title "Mounting special filesystems" +check mount -n -t proc proc /proc +check mount -n -t usbfs none /proc/bus/usb +check mount -n -t sysfs sysfs /sys +check mount -n -t tmpfs tmp /tmp +status + +title "Preparing /dev" +check mount -n -t tmpfs udev /dev +check mkdir /dev/pts +check mount -n -t devpts devpts /dev/pts +check cp -a /lib/udev/devices/* /dev +status + +title "Starting supervisor" +check start-stop-daemon -S -b -x /usr/bin/runsvdir -- /var/service/ +status + +# wait for udev +while [ ! -d /dev/.udev/ ]; do + sleep 1; +done + +if [ -x /sbin/modprobe -a -n "$modules" ]; then + title "Preloading requested kernel modules" + for x in $(echo "$modules" | tr ':' ' '); do + if expr "$x" : - > /dev/null; then + echo "blacklist ${x#-}" >> /etc/modprobe.conf + else + check modprobe $(echo "$x" | tr ',' ' ') + fi + done + status +fi + +title "Starting early networking (Pass 1)" +check unet up +status + +title "Triggering coldplug" +check udevtrigger +check udevsettle +status + +title "Starting early networking (Pass 2)" +check unet up +status