/etc/functions.sh => /lib/functions.sh
SVN-Revision: 32062
This commit is contained in:
		@@ -1,7 +1,7 @@
 | 
				
			|||||||
#!/bin/sh
 | 
					#!/bin/sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [ "$ACTION" = ifup ]; then
 | 
					if [ "$ACTION" = ifup ]; then
 | 
				
			||||||
	. /etc/functions.sh
 | 
						. /lib/functions.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	INCLUDE_ONLY=1
 | 
						INCLUDE_ONLY=1
 | 
				
			||||||
	. /lib/netifd/proto/6in4.sh
 | 
						. /lib/netifd/proto/6in4.sh
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,7 +3,7 @@
 | 
				
			|||||||
# Copyright (c) 2010 OpenWrt.org
 | 
					# Copyright (c) 2010 OpenWrt.org
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[ -n "$INCLUDE_ONLY" ] || {
 | 
					[ -n "$INCLUDE_ONLY" ] || {
 | 
				
			||||||
	. /etc/functions.sh
 | 
						. /lib/functions.sh
 | 
				
			||||||
	. ../netifd-proto.sh
 | 
						. ../netifd-proto.sh
 | 
				
			||||||
	init_proto "$@"
 | 
						init_proto "$@"
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
#!/bin/sh
 | 
					#!/bin/sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [ "$ACTION" = ifup ]; then
 | 
					if [ "$ACTION" = ifup ]; then
 | 
				
			||||||
	. /etc/functions.sh
 | 
						. /lib/functions.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	INCLUDE_ONLY=1
 | 
						INCLUDE_ONLY=1
 | 
				
			||||||
	. /lib/netifd/proto/6to4.sh
 | 
						. /lib/netifd/proto/6to4.sh
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,7 +3,7 @@
 | 
				
			|||||||
# Copyright (c) 2010-2012 OpenWrt.org
 | 
					# Copyright (c) 2010-2012 OpenWrt.org
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[ -n "$INCLUDE_ONLY" ] || {
 | 
					[ -n "$INCLUDE_ONLY" ] || {
 | 
				
			||||||
	. /etc/functions.sh
 | 
						. /lib/functions.sh
 | 
				
			||||||
	. ../netifd-proto.sh
 | 
						. ../netifd-proto.sh
 | 
				
			||||||
	init_proto "$@"
 | 
						init_proto "$@"
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -48,7 +48,7 @@ system_config() {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
apply_uci_config() {
 | 
					apply_uci_config() {
 | 
				
			||||||
	sh -c '. /etc/functions.sh; include /lib/config; uci_apply_defaults'
 | 
						sh -c '. /lib/functions.sh; include /lib/config; uci_apply_defaults'
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
start() {
 | 
					start() {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -14,7 +14,7 @@ system_config() {
 | 
				
			|||||||
LOGGER="cat"
 | 
					LOGGER="cat"
 | 
				
			||||||
[ -x /usr/bin/logger ] && LOGGER="logger -s -p 6 -t sysinit"
 | 
					[ -x /usr/bin/logger ] && LOGGER="logger -s -p 6 -t sysinit"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
. /etc/functions.sh
 | 
					. /lib/functions.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
config_load system
 | 
					config_load system
 | 
				
			||||||
config_foreach system_config system
 | 
					config_foreach system_config system
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -21,7 +21,7 @@ pi_init_suppress_stderr="y"
 | 
				
			|||||||
pi_init_path="/bin:/sbin:/usr/bin:/usr/sbin"
 | 
					pi_init_path="/bin:/sbin:/usr/bin:/usr/sbin"
 | 
				
			||||||
pi_init_cmd="/sbin/init"
 | 
					pi_init_cmd="/sbin/init"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
. /etc/functions.sh
 | 
					. /lib/functions.sh
 | 
				
			||||||
. /lib/functions/boot.sh
 | 
					. /lib/functions/boot.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
boot_hook_init preinit_essential
 | 
					boot_hook_init preinit_essential
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -58,7 +58,7 @@ run_ramfs() { # <command> [...]
 | 
				
			|||||||
	for file in $RAMFS_COPY_BIN; do
 | 
						for file in $RAMFS_COPY_BIN; do
 | 
				
			||||||
		install_bin $file
 | 
							install_bin $file
 | 
				
			||||||
	done
 | 
						done
 | 
				
			||||||
	install_file /etc/resolv.conf /etc/functions.sh /lib/functions.sh /lib/upgrade/*.sh $RAMFS_COPY_DATA
 | 
						install_file /etc/resolv.conf /lib/functions.sh /lib/functions.sh /lib/upgrade/*.sh $RAMFS_COPY_DATA
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pivot $RAM_ROOT /mnt || {
 | 
						pivot $RAM_ROOT /mnt || {
 | 
				
			||||||
		echo "Failed to switch over to ramfs. Please reboot."
 | 
							echo "Failed to switch over to ramfs. Please reboot."
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,7 +3,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
export HOTPLUG_TYPE="$1"
 | 
					export HOTPLUG_TYPE="$1"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
. /etc/functions.sh
 | 
					. /lib/functions.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin
 | 
					PATH=/bin:/sbin:/usr/bin:/usr/sbin
 | 
				
			||||||
LOGNAME=root
 | 
					LOGNAME=root
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
#!/bin/sh
 | 
					#!/bin/sh
 | 
				
			||||||
# (C) 2008 openwrt.org
 | 
					# (C) 2008 openwrt.org
 | 
				
			||||||
 | 
					
 | 
				
			||||||
. /etc/functions.sh
 | 
					. /lib/functions.sh
 | 
				
			||||||
ACTION=$1
 | 
					ACTION=$1
 | 
				
			||||||
NAME=$2
 | 
					NAME=$2
 | 
				
			||||||
do_led() {
 | 
					do_led() {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
#!/bin/sh
 | 
					#!/bin/sh
 | 
				
			||||||
. /etc/functions.sh
 | 
					. /lib/functions.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# initialize defaults
 | 
					# initialize defaults
 | 
				
			||||||
RAMFS_COPY_BIN=""	# extra programs for temporary ramfs root
 | 
					RAMFS_COPY_BIN=""	# extra programs for temporary ramfs root
 | 
				
			||||||
@@ -169,7 +169,7 @@ kill_remaining KILL
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
if [ -n "$(rootfs_type)" ]; then
 | 
					if [ -n "$(rootfs_type)" ]; then
 | 
				
			||||||
	v "Switching to ramdisk..."
 | 
						v "Switching to ramdisk..."
 | 
				
			||||||
	run_ramfs '. /etc/functions.sh; include /lib/upgrade; do_upgrade'
 | 
						run_ramfs '. /lib/functions.sh; include /lib/upgrade; do_upgrade'
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
	do_upgrade
 | 
						do_upgrade
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
#!/bin/sh
 | 
					#!/bin/sh
 | 
				
			||||||
# Copyright (C) 2006 OpenWrt.org
 | 
					# Copyright (C) 2006 OpenWrt.org
 | 
				
			||||||
 | 
					
 | 
				
			||||||
. /etc/functions.sh
 | 
					. /lib/functions.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
usage() {
 | 
					usage() {
 | 
				
			||||||
	cat <<EOF
 | 
						cat <<EOF
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@
 | 
				
			|||||||
# See /LICENSE for more information.
 | 
					# See /LICENSE for more information.
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
 | 
					
 | 
				
			||||||
. /etc/functions.sh
 | 
					. /lib/functions.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
reset_block_cb() {
 | 
					reset_block_cb() {
 | 
				
			||||||
	mount_cb() { 
 | 
						mount_cb() { 
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
#!/bin/sh
 | 
					#!/bin/sh
 | 
				
			||||||
. /etc/functions.sh
 | 
					. /lib/functions.sh
 | 
				
			||||||
. /lib/netifd/netifd-proto.sh
 | 
					. /lib/netifd/netifd-proto.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
find_3g_iface() {
 | 
					find_3g_iface() {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
#!/bin/sh
 | 
					#!/bin/sh
 | 
				
			||||||
FW_LIBDIR=/lib/firewall
 | 
					FW_LIBDIR=/lib/firewall
 | 
				
			||||||
 | 
					
 | 
				
			||||||
. /etc/functions.sh
 | 
					. /lib/functions.sh
 | 
				
			||||||
. ${FW_LIBDIR}/fw.sh
 | 
					. ${FW_LIBDIR}/fw.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
case "$(type fw)" in
 | 
					case "$(type fw)" in
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -6,7 +6,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
[ "$DEVICE" == "lo" ] && exit 0
 | 
					[ "$DEVICE" == "lo" ] && exit 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
. /etc/functions.sh
 | 
					. /lib/functions.sh
 | 
				
			||||||
. /lib/firewall/core.sh
 | 
					. /lib/firewall/core.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
fw_init
 | 
					fw_init
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
#!/bin/sh
 | 
					#!/bin/sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
. /etc/functions.sh
 | 
					. /lib/functions.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [ "$ACTION" != "ifup" ]; then
 | 
					if [ "$ACTION" != "ifup" ]; then
 | 
				
			||||||
	exit
 | 
						exit
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -9,7 +9,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
[ "$DSL_NOTIFICATION_TYPE" = "DSL_INTERFACE_STATUS" ] || exit 0
 | 
					[ "$DSL_NOTIFICATION_TYPE" = "DSL_INTERFACE_STATUS" ] || exit 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
. /etc/functions.sh
 | 
					. /lib/functions.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
include /lib/network
 | 
					include /lib/network
 | 
				
			||||||
scan_interfaces
 | 
					scan_interfaces
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
#!/bin/sh
 | 
					#!/bin/sh
 | 
				
			||||||
[ -z "$1" ] && echo "Error: should be run by udhcpc" && exit 1
 | 
					[ -z "$1" ] && echo "Error: should be run by udhcpc" && exit 1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
. /etc/functions.sh
 | 
					. /lib/functions.sh
 | 
				
			||||||
. /lib/netifd/netifd-proto.sh
 | 
					. /lib/netifd/netifd-proto.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
set_classless_routes() {
 | 
					set_classless_routes() {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
#!/bin/sh
 | 
					#!/bin/sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
. /etc/functions.sh
 | 
					. /lib/functions.sh
 | 
				
			||||||
. ../netifd-proto.sh
 | 
					. ../netifd-proto.sh
 | 
				
			||||||
init_proto "$@"
 | 
					init_proto "$@"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -51,7 +51,7 @@ else
 | 
				
			|||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [ -n "$setup_wifi" ] && grep -q config /etc/config/wireless; then
 | 
					if [ -n "$setup_wifi" ] && grep -q config /etc/config/wireless; then
 | 
				
			||||||
	. /etc/functions.sh
 | 
						. /lib/functions.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	find_related_radios() {
 | 
						find_related_radios() {
 | 
				
			||||||
		local wdev wnet
 | 
							local wdev wnet
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,7 +3,7 @@
 | 
				
			|||||||
[ -x /usr/sbin/pppd ] || exit 0
 | 
					[ -x /usr/sbin/pppd ] || exit 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[ -n "$INCLUDE_ONLY" ] || {
 | 
					[ -n "$INCLUDE_ONLY" ] || {
 | 
				
			||||||
	. /etc/functions.sh
 | 
						. /lib/functions.sh
 | 
				
			||||||
	. ../netifd-proto.sh
 | 
						. ../netifd-proto.sh
 | 
				
			||||||
	init_proto "$@"
 | 
						init_proto "$@"
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
#!/bin/sh
 | 
					#!/bin/sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
. /etc/functions.sh
 | 
					. /lib/functions.sh
 | 
				
			||||||
. ../netifd-proto.sh
 | 
					. ../netifd-proto.sh
 | 
				
			||||||
init_proto "$@"
 | 
					init_proto "$@"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
#!/bin/sh
 | 
					#!/bin/sh
 | 
				
			||||||
# Copyright (C) 2011 OpenWrt.org
 | 
					# Copyright (C) 2011 OpenWrt.org
 | 
				
			||||||
 | 
					
 | 
				
			||||||
. /etc/functions.sh
 | 
					. /lib/functions.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
include /lib/network
 | 
					include /lib/network
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
#!/bin/sh
 | 
					#!/bin/sh
 | 
				
			||||||
[ -e /etc/functions.sh ] && . /etc/functions.sh || . ./functions.sh
 | 
					[ -e /lib/functions.sh ] && . /lib/functions.sh || . ./functions.sh
 | 
				
			||||||
[ -x /sbin/modprobe ] && {
 | 
					[ -x /sbin/modprobe ] && {
 | 
				
			||||||
	insmod="modprobe"
 | 
						insmod="modprobe"
 | 
				
			||||||
	rmmod="$insmod -r"
 | 
						rmmod="$insmod -r"
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user