load of function scripts changed.

The prefix of the related script is added in the load of the script

Signed-off-by: MOHAMED Kallel <mohamed.kallel@pivasoftware.com>
This commit is contained in:
MOHAMED Kallel 2014-11-12 16:29:22 +01:00
parent 4691b0dc46
commit 01c8fae1b7
13 changed files with 29 additions and 32 deletions

View file

@ -190,40 +190,12 @@ if [ ${FLAGS_debug} -eq ${FLAGS_TRUE} ]; then
echo "[debug] started at \"`date`\""
fi
prefix_list="\
InternetGatewayDevice. \
InternetGatewayDevice.DeviceInfo. \
InternetGatewayDevice.LANDevice. \
InternetGatewayDevice.ManagementServer. \
InternetGatewayDevice.WANDevice. \
InternetGatewayDevice.Layer2Bridging. \
InternetGatewayDevice.Time. \
InternetGatewayDevice.X_INTENO_SE_IpAccCfg. \
InternetGatewayDevice.X_INTENO_SE_LoginCfg. \
InternetGatewayDevice.Layer3Forwarding."
prefix_list=""
. /lib/functions/network.sh
. /usr/share/freecwmp/functions/common
. /usr/share/freecwmp/functions/device_info
. /usr/share/freecwmp/functions/lan_device
. /usr/share/freecwmp/functions/management_server
. /usr/share/freecwmp/functions/wan_device
. /usr/share/freecwmp/functions/x_inteno_se_logincfg
. /usr/share/freecwmp/functions/x_inteno_se_ipacccfg
. /usr/share/freecwmp/functions/layer_2_bridging
. /usr/share/freecwmp/functions/models
. /usr/share/freecwmp/functions/times
. /usr/share/freecwmp/functions/layer_3_forwarding
if [ $(db get hw.board.hasVoice) -eq 1 ]; then
. /usr/share/freecwmp/functions/voice_service
prefix_list="$prefix_list InternetGatewayDevice.Services."
fi
if [ -e "/etc/config/ice" ]; then
. /usr/share/freecwmp/functions/x_inteno_se_ice
prefix_list="$prefix_list InternetGatewayDevice.X_INTENO_SE_ICE."
fi
for ffile in `ls /usr/share/freecwmp/functions/`; do
. /usr/share/freecwmp/functions/$ffile
done
config_load cwmp

View file

@ -4,6 +4,7 @@
# Author Ahmed Zribi <ahmed.zribi@pivasoftware.com>
# Author Mohamed Kallel <mohamed.kallel@pivasoftware.com>
prefix_list="$prefix_list InternetGatewayDevice.DeviceInfo."
get_device_info_hardware_version() {
local val=""

View file

@ -5,6 +5,8 @@
# Author Ahmed Zribi <ahmed.zribi@pivasoftware.com>
# Author Feten Besbes <feten.besbes@pivasoftware.com>
prefix_list="$prefix_list InternetGatewayDevice.LANDevice."
get_lan_device_interface() {
local i=0
local ret=""

View file

@ -2,6 +2,8 @@
# Copyright (C) 2013 Inteno Broadband Technology AB
# Author Feten Besbes <feten.besbes@pivasoftware.com>
prefix_list="$prefix_list InternetGatewayDevice.Layer2Bridging."
set_bridge_bridgename() {
$UCI_RENAME network.$1=$2
delay_service reload "network" "1"

View file

@ -1,6 +1,9 @@
#!/bin/sh
# Copyright (C) 2014 Inteno Broadband Technology AB
# Author Mohamed Kallel <mohamed.kallel@pivasoftware.com>
prefix_list="$prefix_list InternetGatewayDevice.Layer3Forwarding."
hex_to_ip() {
local hex="$1"
printf "%d.%d.%d.%d" 0x${hex:0:2} 0x${hex:2:2} 0x${hex:4:2} 0x${hex:6:2}

View file

@ -4,6 +4,8 @@
# Author Ahmed Zribi <ahmed.zribi@pivasoftware.com>
# Author Mohamed Kallel <mohamed.kallel@pivasoftware.com>
prefix_list="$prefix_list InternetGatewayDevice.ManagementServer."
get_management_server_connection_request_url() {
local val
if [ -z "$default_management_server_connection_request_url" ]; then

View file

@ -3,6 +3,9 @@
# Author Mohamed Kallel <mohamed.kallel@pivasoftware.com>
#InternetGatewayDevice.
prefix_list="InternetGatewayDevice. $prefix_list"
get_cache_InternetGatewayDevice() {
get_object_cache_generic "InternetGatewayDevice." "0" "0"
}

View file

@ -3,6 +3,8 @@
# Author Mohamed Kallel <mohamed.kallel@pivasoftware.com>
# Author Feten Besbes <feten.besbes@pivasoftware.com>
prefix_list="$prefix_list InternetGatewayDevice.Time."
get_time_ntpserver() {
local ntp_num="$1"
local val=`$UCI_GET system.ntp.server | awk -F ' ' -v var=$ntp_num '{print $var}'`

View file

@ -4,6 +4,8 @@
# Author Ahmed Zribi <ahmed.zribi@pivasoftware.com>
# Author Mohamed Kallel <mohamed.kallel@pivasoftware.com>
prefix_list="$prefix_list InternetGatewayDevice.Services."
voice_service_save_instance_config() {
local i="$1" #line number
local j="$2" #line profile

View file

@ -3,6 +3,8 @@
# Copyright (C) 2013 Inteno Broadband Technology AB
# Author Ahmed Zribi <ahmed.zribi@pivasoftware.com>
prefix_list="$prefix_list InternetGatewayDevice.WANDevice."
WAN_INST_ETH=1
WAN_INST_ATM=2
WAN_INST_PTM=3

View file

@ -1,6 +1,8 @@
#!/bin/sh
# Copyright (C) 2014 Inteno Broadband Technology AB
prefix_list="$prefix_list InternetGatewayDevice.X_INTENO_SE_ICE."
get_ice_cloud_enable() {
case "$($UCI_GET ice.cloud.enabled)" in
1|"true"|"yes"|"on")

View file

@ -2,6 +2,8 @@
# Copyright (C) 2013 Inteno Broadband Technology AB
# Author Feten Besbes <feten.besbes@pivasoftware.com>
prefix_list="$prefix_list InternetGatewayDevice.X_INTENO_SE_IpAccCfg."
get_firewall_rules() {
local i=0
local rule

View file

@ -3,6 +3,8 @@
# Copyright (C) 2013 Inteno Broadband Technology AB
# Author Feten Besbes <feten.besbes@pivasoftware.com>
prefix_list="$prefix_list InternetGatewayDevice.X_INTENO_SE_LoginCfg."
set_x_bcm_password() {
local usr_type=$1
local new_pwd=$2