Changeset 8172859 in clfs-embedded


Ignore:
Timestamp:
Sep 7, 2009, 4:19:14 AM (15 years ago)
Author:
Maarten Lankhorst <mlankhorst@…>
Branches:
master
Children:
2e856a4
Parents:
b71d8ca
Message:

bootscripts: Ignore unknown executables

Location:
bootscripts/clfs/rc.d
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • bootscripts/clfs/rc.d/shutdown

    rb71d8ca r8172859  
    2020done
    2121
    22 echo -n "Syncing hardware clock to system clock:"
    23 hwclock --systohc --utc
    24 check_status
     22if [ -x /sbin/hwclock ]; then
     23        echo -n "Syncing hardware clock to system clock:"
     24        hwclock --systohc --utc
     25        check_status
     26fi
    2527
    26 echo -n "Disabling swap space: "
    27 swapoff -a
    28 check_status
     28if [ -x /sbin/swapoff ]; then
     29        echo -n "Disabling swap space: "
     30        swapoff -a
     31        check_status
     32fi
    2933
    3034echo -n "Syncing all filesystems: "
  • bootscripts/clfs/rc.d/startup

    rb71d8ca r8172859  
    1313/sbin/mdev -s
    1414
    15 echo -n "Setting system clock: "
    16 hwclock --hctosys --utc
    17 check_status
     15if [ -x /sbin/hwclock ]; then
     16        echo -n "Setting system clock: "
     17        hwclock --hctosys --utc
     18        check_status
     19fi
    1820
    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
     21if [ -x /sbin/fsck ]; then
     22        echo "Starting fsck for root filesystem."
     23        fsck -T -C /
     24        if [ "$?" -gt 2 ]; then
     25                echo "WARNING: Errors found while checking root filesystem."
     26                echo "You can login as root now, the system will reboot after logout."
     27                sulogin
     28                reboot
     29        elif [ "$?" = "2" ]; then
     30                echo "NOTICE: System needs to be rebooted now."
     31                sleep 1
     32                reboot
     33        else
     34                echo -n "Checking root filesystem: "
     35                check_status
     36        fi
    3337fi
    3438
     
    5761fi
    5862
    59 echo -n "Enabling swap space: "
    60 swapon -a
    61 check_status
     63if [ -x /sbin/swapon ]; then
     64        echo -n "Enabling swap space: "
     65        swapon -a
     66        check_status
     67fi
    6268
    6369echo -n "Setting hostname: "
Note: See TracChangeset for help on using the changeset viewer.