Changeset 22002


Ignore:
Timestamp:
2010-07-01T01:09:13+02:00 (8 years ago)
Author:
cshore
Message:

block-extroot, block-mount: Fixed multiple bugs which prevented e2fsck from being executed on the external root filesystem before mounting it as root. Added /etc/e2fsck.conf which indicates that the clock is broken (since most OpenWRT devices don't have a battery backed RTC) so that e2fsck will not exit with fatal error when the rdat has not yet been run (i.e. before network).

Location:
trunk/package
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/block-extroot/files/50_determine_usb_root

    r20390 r22002  
    55 
    66 
    7 . /etc/functions.sh 
    8 . /lib/functions/extmount.sh 
    9 . /lib/functions/mount.sh 
     7determine_external_root() { 
     8        . /etc/functions.sh 
     9        . /lib/functions/extmount.sh 
     10        . /lib/functions/mount.sh 
    1011 
    11 determine_external_root() { 
    1212        local OLD_UCI_CONFIG_DIR="$UCI_CONFIG_DIR" 
    1313        set_jffs_mp 
  • trunk/package/block-mount/files/fsck.sh

    r19877 r22002  
    1313         
    1414 
    15         [ -n "$fsck_type" ] && [ "$fsck_type" != "swap" ] && { 
    16                 grep -q "$device" /proc/swaps || grep -q "$device" /proc/mounts || { 
    17                         [ -e "$device" ] && [ "$fsck_enabled" -eq 1 ] && { 
    18                                 for known_type in $libmount_known_fsck; do 
    19                                         if [ "$known_type" = "$fsck_fstype" ]; then 
    20                                                 fsck_${known_type} "$device" 
    21                                                 found_fsck=1 
    22                                                 break 
    23                                         fi 
    24                                 done 
    25                                 if [ "$found_fsck" -ne 1 ]; then 
    26                                         logger -t 'fstab' "Unable to check/repair $device; no known fsck for filesystem type $fstype" 
     15        grep -q "$device" /proc/swaps || grep -q "$device" /proc/mounts || { 
     16                [ -e "$device" ] && [ "$fsck_enabled" -eq 1 ] && { 
     17                        for known_type in $libmount_known_fsck; do 
     18                                if [ "$known_type" = "$fsck_fstype" ]; then 
     19                                        fsck_${known_type} "$device" 
     20                                        found_fsck=1 
     21                                        break 
    2722                                fi 
    28                         } 
     23                        done 
     24                        if [ "$found_fsck" -ne 1 ]; then 
     25                                logger -t 'fstab' "Unable to check/repair $device; no known fsck for filesystem type $fstype" 
     26                        fi 
    2927                } 
    3028        } 
  • trunk/package/block-mount/files/mount.sh

    r19877 r22002  
    2929                shift 
    3030                local found_device="" 
    31                 local fsck_type="" 
    3231                 
    3332                found_device="$(libmount_find_device_by_id "$uuid" "$label" "$device" "$cfgdevice")" 
     
    3635                                [ "$enabled_fsck" -eq 1 ] && { 
    3736                                        grep -q "$found_device" /proc/swaps || grep -q "$found_device" /proc/mounts || { 
    38                                                 libmount_fsck "$found_device" "$fsck_type" "$enabled_fsck" 
     37                                                libmount_fsck "$found_device" "$fstype" "$enabled_fsck" 
    3938                                        } 
    4039                                }                                                                
     
    7372                 
    7473                local found_device="" 
    75                 local fsck_type="" 
    7674                 
    7775                found_device="$(libmount_find_device_by_id "$uuid" "$label" "$device" "$cfgdevice")" 
  • trunk/package/e2fsprogs/Makefile

    r20572 r22002  
    159159        $(INSTALL_DIR) $(1)/lib/functions/fsck 
    160160        $(INSTALL_DATA) ./files/e2fsck.sh $(1)/lib/functions/fsck/ 
     161        $(INSTALL_DATA) ./files/e2fsck.conf $(1)/etc/e2fsck.conf 
    161162endef 
    162163 
Note: See TracChangeset for help on using the changeset viewer.