Changeset 292c832 in bootscripts-embedded for clfs/rc.d/startup
- Timestamp:
- Jan 30, 2011, 10:13:21 AM (14 years ago)
- Branches:
- master
- Children:
- 73ee2a6
- Parents:
- 5d96f6a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
clfs/rc.d/startup
r5d96f6a r292c832 7 7 /bin/mount -t proc none /proc 8 8 /bin/mount -t sysfs none /sys 9 /bin/mount -t tmpfs /tmp /tmp 9 10 /bin/mount -t tmpfs -o mode=0755 none /dev 10 11 /bin/mkdir /dev/pts 11 12 /bin/mkdir /dev/shm 13 /bin/mount -t tmpfs -o mode=0755 /var /var 14 for x in cache lib lib/misc lib/locate local lock log mail opt run spool; do mkdir /var/$x; done 15 ln -s ../tmp /var/tmp 16 12 17 /bin/echo "/sbin/mdev" > /proc/sys/kernel/hotplug 18 19 echo -n "Starting mdev: " 13 20 /sbin/mdev -s 14 15 echo -n "Setting system clock: "16 hwclock --hctosys --utc17 check_status18 19 echo "Starting fsck for root filesystem."20 fsck -T -C /21 if [ "$?" -gt 2 ]; then22 echo "WARNING: Errors found while checking root filesystem."23 echo "You can login as root now, the system will reboot after logout."24 sulogin25 reboot26 elif [ "$?" = "2" ]; then27 echo "NOTICE: System needs to be rebooted now."28 sleep 129 reboot30 else31 echo -n "Checking root filesystem: "32 check_status33 fi34 35 echo -n "Remounting root rw: "36 mount -o remount,rw /37 21 check_status 38 22 … … 41 25 check_status 42 26 43 echo "Starting fsck for local filesystems." 44 fsck -A -C -R -T -t nonfs,nosmbfs 45 if [ "$?" -gt 2 ]; then 46 echo "WARNING: Errors found while checking filesystems." 47 echo "You can login as root now, the system will reboot after logout." 48 sulogin 49 reboot 50 elif [ "$?" = "2" ]; then 51 echo "NOTICE: System needs to be rebooted now." 52 sleep 1 53 reboot 54 else 55 echo -n "Checking local filesystems: " 56 check_status 27 if [ -x /sbin/hwclock ] && [ -e /dev/rtc ]; then 28 echo -n "Setting system clock: " 29 hwclock --hctosys --utc 30 check_status 57 31 fi 58 32 59 echo -n "Enabling swap space: " 60 swapon -a 33 if [ -x /sbin/fsck ]; then 34 echo "Starting fsck for local filesystems." 35 fsck -A -C -R -T -t nonfs,nosmbfs 36 if [ "$?" -gt 2 ]; then 37 echo "WARNING: Errors found while checking filesystems." 38 echo "You can login as root now, the system will reboot after logout." 39 sulogin 40 reboot 41 elif [ "$?" = "2" ]; then 42 echo "NOTICE: System needs to be rebooted now." 43 sleep 1 44 reboot 45 else 46 echo -n "Checking local filesystems: " 47 check_status 48 fi 49 fi 50 51 52 if [ -x /sbin/swapon ]; then 53 echo -n "Enabling swap space: " 54 swapon -a 55 check_status 56 fi 57 58 echo -n "Remounting root rw: " 59 mount -o remount,rw / 61 60 check_status 62 61 … … 82 81 echo "Running start scripts." 83 82 84 for i in /etc/rc.d/start/*; do 85 if [ -x $i ]; then 86 $i start 87 fi 83 for i in /etc/rc.d/start/* 84 do 85 if [ -x $i ]; then 86 $i start 87 fi 88 88 done 89 90 exit 0
Note:
See TracChangeset
for help on using the changeset viewer.