#!/bin/bash . /etc/rc.conf . /etc/rc.d/functions /bin/mount -n -t ramfs none /dev /bin/mount -n -t proc none /proc /bin/mount -n -t sysfs none /sys /bin/mknod /dev/null c 1 3 /bin/mknod /dev/zero c 1 5 /bin/mknod /dev/console c 5 1 /bin/ln -snf /proc/self/fd /dev/fd /bin/ln -snf /proc/self/fd/0 /dev/stdin /bin/ln -snf /proc/self/fd/1 /dev/stdout /bin/ln -snf /proc/self/fd/2 /dev/stderr /bin/ln -snf /proc/kcore /dev/core /bin/mkdir /dev/pts /bin/mkdir /dev/shm if [ -f /etc/localtime ]; then /sbin/hwclock --hctosys --localtime --directisa --noadjfile & fi echo > /proc/sys/kernel/hotplug if [ -x /sbin/udevadm -a -d /sys/block ]; then stat_busy "Starting UDev Daemon" /sbin/udevd --daemon /sbin/udevadm trigger & stat_done else status "Using static /dev filesystem" true fi if ! [ "$load_modules" = "off" ]; then if [ -f /proc/modules ]; then stat_busy "Loading Modules" for mod in "${MODULES[@]}"; do if [ "$mod" = "${mod#!}" ]; then /sbin/modprobe $mod & fi done stat_done fi if [ -d /proc/acpi ]; then stat_busy "Loading standard ACPI modules" ACPI_MODULES="ac battery button fan processor thermal" k="$(echo $BLACKLIST ${MOD_BLACKLIST[@]} | /bin/sed 's|-|_|g')" j="$(echo ${MODULES[@]} | /bin/sed 's|-|_|g')" for m in ${j}; do [ "$m" != "${m#!}" ] && k="${k} ${m#!}" done k="${k} $(echo ${disablemodules} | /bin/sed 's|-|_|g' | /bin/sed 's|,| |g')" for n in ${ACPI_MODULES}; do if ! echo ${k} | /bin/grep "\<$n\>" 2>&1 >/dev/null; then /sbin/modprobe $n > /dev/null 2>&1 & fi done stat_done fi fi if /bin/pidof -o %PPID /sbin/udevd >/dev/null; then stat_busy "Loading UDev uevents" /sbin/udevadm settle & stat_done fi if [ -d /sys/class/net/lo ]; then stat_busy "Bringing up loopback interface" /sbin/ifconfig lo 127.0.0.1 up & stat_done fi status "Mounting Root Read-only" /bin/mount -n -o remount,ro / stat_busy "Mounting Local Filesystems" /bin/mount -n -o remount,rw / /bin/rm -f /etc/mtab* /bin/mount -o remount,rw / if [ -e /proc/mounts ]; then /bin/grep -e "/proc " -e "/sys " -e "/dev " /proc/mounts >> /etc/mtab fi /bin/mount -a -t nonfs,nonfs4,nosmbfs,nocifs,nocodafs,noncpfs,nosysfs,noshfs,nofuse,nofuseblk & stat_done status "Activating Swap" /sbin/swapon -a & stat_busy "Configuring System Clock" if [ ! -f /var/lib/hwclock/adjtime ]; then echo "0.0 0 0.0" > /var/lib/hwclock/adjtime fi /bin/rm -f /etc/localtime /bin/cp "/usr/share/zoneinfo/Europe/Berlin" /etc/localtime /sbin/hwclock --hctosys --localtime --directisa --noadjfile & stat_done if [ -f /var/run/random-seed ]; then stat_busy "Initializing Random Seed" /bin/cat /var/run/random-seed >/dev/urandom & stat_done fi stat_busy "Removing Leftover Files" /bin/rm -f /etc/nologin &>/dev/null & /bin/rm -f /etc/shutdownpid &>/dev/null & /bin/rm -f /var/lock/* &>/dev/null & /bin/rm -rf /tmp/* /tmp/.* &>/dev/null & (cd /var/run && /usr/bin/find . ! -type d -exec /bin/rm -f -- {} \; ) : > /var/run/utmp #/bin/mkdir /tmp/.ICE-unix && /bin/chmod 1777 /tmp/.ICE-unix /bin/mkdir /tmp/.X11-unix && /bin/chmod 1777 /tmp/.X11-unix & stat_done status "Setting Hostname: rechenknecht" /bin/hostname rechenknecht status "Updating Module Dependencies" /sbin/depmod -A & : >/etc/profile.d/locale.sh /bin/chmod 755 /etc/profile.d/locale.sh stat_busy "Setting Locale: de_DE.utf8" echo "export LANG=de_DE.utf8" >>/etc/profile.d/locale.sh stat_done status "Loading Keyboard Map: de-latin1-nodeadkeys" /bin/loadkeys -q -u de-latin1-nodeadkeys & for i in $(/usr/bin/seq 0 4); do printf "\e(K" > /dev/vc/${i} done echo 'if [ "$CONSOLE" = "" -a "$TERM" = "linux" -a -t 1 ]; then printf "\e(K"; fi' >>/etc/profile.d/locale.sh stat_done