#!/bin/bash # # /linuxrc.loop # # # For More Ramdisk Options ... # ---------------------------- # linuxrc.Commands.Help.txt # # # # 06-Nov-04 amo Date-of-Birth # 13-Nov-04 amo Split off ramdisk options into linuxrc.Commands.Help.txt # 20-Nov-04 amo Split off common mount and checking to linuxrc.common.sh # # # # Include the common functions and definitions # -------------------------------------------- # define docmd(), mount_proc() source linuxrc.common.sh # set | grep ^PATH # # # Flush and reset first # # umount /dev/hda1 # umount /dev/ram0 # umount /proc # # docmd "#" docmd "# Executing /linurc.loop" docmd "#" # # # leave a " " in front of mount, to avoid the premature output of an empty /proc/mounts # ----------------------------- # # # Check /proc # =========== # mount_proc # # # # Make / writable ( need "-n" for /etc/mtab ) # --------------- docmd " mount -n -o rw,remount /dev/loop0 /" # # Remount it again so that it shows up in the now writable /etc/mtab # ---------------- docmd " mount -o rw,remount /dev/loop0 /" # # # docmd "ls -la / " # # # # # Create /usr/local and /opt/home in ramdisk # ------------------------------------------- docmd "sh /root/ramdisks.sh" # docmd "df" # # docmd "source /root/.alias" # # docmd "ls -la" # # # rc.S - does e2fsck checking, needs readonly rootfs # # # Go to Multi-User ( emulate the processes started by /sbin/init ) # --------------- docmd "/etc/rc.d/rc.M" # # start the network # docmd "/etc/rc.d/rc.inet1 start " # # # # Start all the daemons # docmd "/etc/rc.d/rc.inet2 " # # # # start ssh # # # # start iptables docmd "/etc/rc.d/rc.iptables" # # # # Start some virtual consoles ( like /sbin/init but no respawn ) # --------------------------- /sbin/agetty 38400 tty6 linux & /sbin/agetty 38400 tty5 linux & /sbin/agetty 38400 tty4 linux & /sbin/agetty 38400 tty3 linux & /sbin/agetty 38400 tty2 linux & # # docmd "df" # # # # login once # docmd "login" # # # Wait for passwd, Stay in tty1 login forever # --------------- # while [ TRUE ]; do # /sbin/agetty 38400 tty1 linux # done # # # umount /proc # # # End of file