Changeset 21592


Ignore:
Timestamp:
2010-05-28T02:41:57+02:00 (7 years ago)
Author:
jow
Message:

[backfire] merge r21489-r21494

Location:
branches/backfire/package
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/backfire/package/base-files/files/etc/hotplug.d/net/10-net

    r21380 r21592  
    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" ] && { 
  • branches/backfire/package/base-files/files/usr/share/udhcpc/default.script

    r19597 r21592  
    1010        uci_revert_state "$1" "$2" "$3" "$4" 
    1111        uci_set_state "$1" "$2" "$3" "$4" 
    12 } 
    13  
    14 uci_get() { 
    15         [ -n "$ifc" ] || return 
    16         uci -P /dev/null get "$1" 2>/dev/null 
    1712} 
    1813 
  • branches/backfire/package/busybox/files/cron

    r20354 r21592  
    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 
  • branches/backfire/package/uci/Makefile

    r20378 r21592  
    1313PKG_NAME:=uci 
    1414PKG_VERSION:=$(UCI_VERSION)$(if $(UCI_RELEASE),.$(UCI_RELEASE)) 
    15 PKG_RELEASE:=1 
     15PKG_RELEASE:=2 
    1616PKG_REV:=aa3ab8012bfbf793d2884c08ea924545a04e9544 
    1717 
  • branches/backfire/package/uci/files/lib/config/uci.sh

    r19351 r21592  
    22# Shell script compatibility wrappers for /sbin/uci 
    33# 
     4# Copyright (C) 2008-2010  OpenWrt.org 
    45# Copyright (C) 2008  Felix Fietkau <nbd@openwrt.org> 
    56# 
     
    4243uci_set_default() { 
    4344        local PACKAGE="$1" 
    44         /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q show "$1" > /dev/null && return 0 
    45         /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} import "$1" 
    46         /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} commit "$1" 
     45        /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q show "$PACKAGE" > /dev/null && return 0 
     46        /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} import "$PACKAGE" 
     47        /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} commit "$PACKAGE" 
    4748} 
    4849 
     
    7273 
    7374        /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} set "$PACKAGE.$CONFIG.$OPTION=$VALUE" 
     75} 
     76 
     77uci_get_state() { 
     78        uci_get "$1" "$2" "$3" "$4" "/var/state" 
     79} 
     80 
     81uci_get() { 
     82        local PACKAGE="$1" 
     83        local CONFIG="$2" 
     84        local OPTION="$3" 
     85        local DEFAULT="$4" 
     86        local STATE="$5" 
     87 
     88        /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} ${STATE:+-P $STATE} -q get "$PACKAGE${CONFIG:+.$CONFIG}${OPTION:+.$OPTION}" 
     89        RET="$?" 
     90        [ "$RET" -ne 0 ] && [ -n "$DEFAULT" ] && echo "$DEFAULT" 
     91        return "$RET" 
    7492} 
    7593 
  • branches/backfire/package/uhttpd/files/uhttpd.init

    r20884 r21592  
    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 
Note: See TracChangeset for help on using the changeset viewer.