Changeset 27227


Ignore:
Timestamp:
2011-06-19T20:17:44+02:00 (7 years ago)
Author:
jow
Message:

[backfire] merge r27226

Location:
branches/backfire/package/block-mount
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/backfire/package/block-mount/Makefile

    r20876 r27227  
    1010PKG_NAME:=block-mount 
    1111PKG_VERSION:=0.1.0 
    12 PKG_RELEASE:=2 
     12PKG_RELEASE:=2.1 
    1313 
    1414include $(INCLUDE_DIR)/package.mk 
  • branches/backfire/package/block-mount/files/block.sh

    r23429 r27227  
    120120 
    121121        local fstabnew 
    122          
     122 
    123123        mkdir -p /var/lock 
    124         lock -w /var/lock/fstab.lck && { 
    125                 lock /var/lock/fstab.lck 
    126                 fstabnew="$(mktemp -t '.fstab.XXXXXXXX')" 
    127                 cat /tmp/fstab | grep -E -v "^$device[[:blank:]]" >>"$fstabnew" 
    128                 [ "$enabled" -eq 1 ] && echo "$device   none    swap    sw      0       0" >> "$fstabnew" 
    129                 cat "$fstabnew" >/tmp/fstab 
    130                 rm -f $fstabnew 
    131                 lock -u /var/lock/fstab.lck 
    132         } 
     124        lock /var/lock/fstab.lck 
     125        fstabnew="$(mktemp -t '.fstab.XXXXXXXX')" 
     126        cat /tmp/fstab | grep -E -v "^$device[[:blank:]]" >>"$fstabnew" 
     127        [ "$enabled" -eq 1 ] && echo "$device   none    swap    sw      0       0" >> "$fstabnew" 
     128        cat "$fstabnew" >/tmp/fstab 
     129        rm -f $fstabnew 
     130        lock -u /var/lock/fstab.lck 
    133131} 
    134132 
     
    145143 
    146144        local fstabnew 
    147          
     145 
    148146        mkdir -p /var/lock 
    149         lock -w /var/lock/fstab.lck && { 
    150                 lock /var/lock/fstab.lck 
    151                 fstabnew="$(mktemp -t '.fstab.XXXXXXXX')" 
    152                 cat /tmp/fstab | grep -E -v "^$device[[:blank:]]" | grep -v "$target" >>"$fstabnew" 
    153                 echo "$device   $target $fstype $options        0       0" >>"$fstabnew" 
    154                 cat "$fstabnew" >/tmp/fstab              
    155                 rm -f $fstabnew 
    156                 lock -u /var/lock/fstab.lck 
    157         } 
     147        lock /var/lock/fstab.lck 
     148        fstabnew="$(mktemp -t '.fstab.XXXXXXXX')" 
     149        cat /tmp/fstab | grep -E -v "^$device[[:blank:]]" | grep -v "$target" >>"$fstabnew" 
     150        echo "$device   $target $fstype $options        0       0" >>"$fstabnew" 
     151        cat "$fstabnew" >/tmp/fstab              
     152        rm -f $fstabnew 
     153        lock -u /var/lock/fstab.lck 
    158154} 
    159155 
  • branches/backfire/package/block-mount/files/fstab.init

    r23429 r27227  
    4242        config_load fstab 
    4343        mkdir -p /var/lock 
    44         lock -w /var/lock/fstab.lck && { 
    45                 lock /var/lock/fstab.lck 
    46                 [ -e /tmp/fstab ] || {  
    47                         echo '# WARNING: this is an auto generated file, please use uci to set defined filesystems' > /tmp/fstab 
    48                 } 
    49                 lock -u /var/lock/fstab.lck 
     44        lock /var/lock/fstab.lck 
     45        [ -e /tmp/fstab ] || { 
     46                echo '# WARNING: this is an auto generated file, please use uci to set defined filesystems' > /tmp/fstab 
    5047        } 
     48        lock -u /var/lock/fstab.lck 
    5149        config_foreach do_swapon swap 
    5250        config_foreach do_mount mount 
Note: See TracChangeset for help on using the changeset viewer.