Ticket #7312: uci_get_usage.r21403.patch

File uci_get_usage.r21403.patch, 2.0 KB (added by Maddes <maddes_trac@…>, 7 years ago)

-p0 patch for trunk/backfire. Change scripts to use new uci_get functions

  • package/base-files/files/etc/hotplug.d/net/10-net

     
    4646        for ifc in $interfaces; do 
    4747                config_get iftype "$ifc" type 
    4848                config_get ifs "$ifc" device 
    49                 confdevs="$(uci get network.$ifc.ifname)" 
     49                confdevs="$(uci_get network.$ifc.ifname)" 
    5050                for dev in $ifs; do 
    5151                        [ "${dev%%\.*}" = "$INTERFACE" ] && { 
    5252                                list_contains confdevs "$dev" || list_remove ifs "$dev" 
  • package/base-files/files/usr/share/udhcpc/default.script

     
    1111        uci_set_state "$1" "$2" "$3" "$4" 
    1212} 
    1313 
    14 uci_get() { 
    15         [ -n "$ifc" ] || return 
    16         uci -P /dev/null get "$1" 2>/dev/null 
    17 } 
    18  
    1914setup_interface () { 
    2015        local old_ip 
    2116        local old_broadcast 
  • package/busybox/files/cron

     
    33START=50 
    44 
    55start () { 
    6         loglevel=$(/sbin/uci get "system.@system[0].cronloglevel" 2>/dev/null) 
     6        loglevel=$(uci_get "system.@system[0].cronloglevel") 
    77        [ -z "$(ls /etc/crontabs/)" ] && exit 1 
    88        mkdir -p /var/spool/cron 
    99        ln -s /etc/crontabs /var/spool/cron/ 2>/dev/null 
  • package/uhttpd/files/uhttpd.init

     
    4848        UHTTPD_KEY="" 
    4949 
    5050        local cfg="$1" 
    51         local realm="$(uci get system.@system[0].hostname 2>/dev/null)" 
     51        local realm="$(uci_get system.@system[0].hostname)" 
    5252        local listen http https 
    5353 
    5454        append_arg "$cfg" home "-h"