. /lib/functions.sh
-local rfkill_state=0
+rfkill_state=0
wifi_rfkill_set() {
uci set wireless.$1.disabled=$rfkill_state
#!/bin/sh
-local ppwd="$(sed -ne '/^root:/s/^root:\([^:]*\):.*$/\1/p' /etc/passwd)"
-local spwd="$(sed -ne '/^root:/s/^root:\([^:]*\):.*$/\1/p' /etc/shadow)"
+ppwd="$(sed -ne '/^root:/s/^root:\([^:]*\):.*$/\1/p' /etc/passwd)"
+spwd="$(sed -ne '/^root:/s/^root:\([^:]*\):.*$/\1/p' /etc/shadow)"
if [ -n "${ppwd#[\!x]}" ] && [ -z "${spwd#[\!x]}" ]; then
logger -t migrate-shadow "Moving root password hash into shadow database"
# Copyright (C) 2010 OpenWrt.org
#
-local dev="$(uci -q get network.@switch_vlan[0].device)"
-local vlan="$(uci -q get network.@switch_vlan[0].vlan)"
+dev="$(uci -q get network.@switch_vlan[0].device)"
+vlan="$(uci -q get network.@switch_vlan[0].vlan)"
if [ "$dev" = "rtl8366s" ] && [ "$vlan" = 0 ]; then
logger -t vlan-migration "VLAN 0 is invalid for RTL8366s, changing to 1"
}
-local model="$(sed -ne 's/^machine[ \t]*: //p' /proc/cpuinfo)"
-local boardtype="$(nvram get boardtype)"
-local boardnum="$(nvram get boardnum)"
+model="$(sed -ne 's/^machine[ \t]*: //p' /proc/cpuinfo)"
+boardtype="$(nvram get boardtype)"
+boardnum="$(nvram get boardnum)"
board_config_update
logger -t network "network config is invalid, creating new one"
-local lan_proto="$(uci -q get network.lan.proto)"
-local lan_ipaddr="$(uci -q get network.lan.ipaddr)"
-local lan_netmask="$(uci -q get network.lan.netmask)"
-local wan_proto="$(uci -q get network.wan.proto)"
-local wan_ipaddr="$(uci -q get network.wan.ipaddr)"
-local wan_netmask="$(uci -q get network.wan.netmask)"
+lan_proto="$(uci -q get network.lan.proto)"
+lan_ipaddr="$(uci -q get network.lan.ipaddr)"
+lan_netmask="$(uci -q get network.lan.netmask)"
+wan_proto="$(uci -q get network.wan.proto)"
+wan_ipaddr="$(uci -q get network.wan.ipaddr)"
+wan_netmask="$(uci -q get network.wan.netmask)"
echo "" > /etc/config/network
config_generate
include /lib/network
scan_interfaces
-local led
config_load system
config_get led led_dsl sysfs
if [ -n "$led" ]; then
esac
fi
-local interfaces=`ubus list network.interface.\* | cut -d"." -f3`
-local ifc
+interfaces=`ubus list network.interface.\* | cut -d"." -f3`
for ifc in $interfaces; do
- local up
json_load "$(ifstatus $ifc)"
json_get_var up up
- local auto
config_get_bool auto "$ifc" auto 1
- local proto
json_get_var proto proto
if [ "$DSL_INTERFACE_STATUS" = "UP" ]; then
# This script sets system defaults for the hardware on firstboot
#
-local hardware=`sed -n /Hardware/s/.*:.//p /proc/cpuinfo`
+hardware=`sed -n /Hardware/s/.*:.//p /proc/cpuinfo`
wrt350nv2_default() {
# leds