Changeset 292c832 in bootscripts-embedded for clfs/rc.d/startup


Ignore:
Timestamp:
Jan 30, 2011, 10:13:21 AM (13 years ago)
Author:
Andrew Bradford <bradfa@…>
Branches:
master
Children:
73ee2a6
Parents:
5d96f6a
Message:

Imported updates of existing bootscripts

Imported bootscripts that already existed from clfs-embedded/bootscripts
as bootscripts should be kept in this repo rather than in the
clfs-embedded repo.

The script changes have NOT BEEN TESTED! (yet)
This is part of a cleanup of bootscripts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • clfs/rc.d/startup

    r5d96f6a r292c832  
    77/bin/mount -t proc none /proc
    88/bin/mount -t sysfs none /sys
     9/bin/mount -t tmpfs /tmp /tmp
    910/bin/mount -t tmpfs -o mode=0755 none /dev
    1011/bin/mkdir /dev/pts
    1112/bin/mkdir /dev/shm
     13/bin/mount -t tmpfs -o mode=0755 /var /var
     14for x in cache lib lib/misc lib/locate local lock log mail opt run spool; do mkdir /var/$x; done
     15ln -s ../tmp /var/tmp
     16
    1217/bin/echo "/sbin/mdev" > /proc/sys/kernel/hotplug
     18
     19echo -n "Starting mdev: "
    1320/sbin/mdev -s
    14 
    15 echo -n "Setting system clock: "
    16 hwclock --hctosys --utc
    17 check_status
    18 
    19 echo "Starting fsck for root filesystem."
    20 fsck -T -C /
    21 if [ "$?" -gt 2 ]; then
    22   echo "WARNING: Errors found while checking root filesystem."
    23   echo "You can login as root now, the system will reboot after logout."
    24   sulogin
    25   reboot
    26 elif [ "$?" = "2" ]; then
    27   echo "NOTICE: System needs to be rebooted now."
    28   sleep 1
    29   reboot
    30 else
    31   echo -n "Checking root filesystem: "
    32   check_status
    33 fi
    34 
    35 echo -n "Remounting root rw: "
    36 mount -o remount,rw /
    3721check_status
    3822
     
    4125check_status
    4226
    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
     27if [ -x /sbin/hwclock ] && [ -e /dev/rtc ]; then
     28        echo -n "Setting system clock: "
     29        hwclock --hctosys --utc
     30        check_status
    5731fi
    5832
    59 echo -n "Enabling swap space: "
    60 swapon -a
     33if [ -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
     49fi
     50
     51
     52if [ -x /sbin/swapon ]; then
     53        echo -n "Enabling swap space: "
     54        swapon -a
     55        check_status
     56fi
     57
     58echo -n "Remounting root rw: "
     59mount -o remount,rw /
    6160check_status
    6261
     
    8281echo "Running start scripts."
    8382
    84 for i in /etc/rc.d/start/*; do
    85   if [ -x $i ]; then
    86     $i start
    87   fi
     83for i in /etc/rc.d/start/*
     84do
     85        if [ -x $i ]; then
     86                $i start
     87        fi
    8888done
     89
     90exit 0
Note: See TracChangeset for help on using the changeset viewer.