use absolute paths in include() shell function
authorFelix Fietkau <nbd@openwrt.org>
Sun, 24 Sep 2006 13:32:18 +0000 (13:32 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sun, 24 Sep 2006 13:32:18 +0000 (13:32 +0000)
SVN-Revision: 4852

openwrt/package/base-files/default/etc/functions.sh
openwrt/package/base-files/default/etc/hotplug.d/net/10-net
openwrt/package/base-files/default/etc/init.d/S40network
openwrt/package/base-files/default/sbin/ifdown
openwrt/package/base-files/default/sbin/wifi
openwrt/package/base-files/default/usr/share/udhcpc/default.script

index 27b0a6d..ce22ed1 100755 (executable)
@@ -93,7 +93,7 @@ load_modules() {
 }
 
 include() {
-       for file in $(ls /lib/$1/*.sh 2>/dev/null); do
+       for file in $(ls $1/*.sh 2>/dev/null); do
                . $file
        done
 }
index b514075..0a24b05 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright (C) 2006 OpenWrt.org
 
-include network
+include /lib/network
 
 addif() {
        scan_interfaces
index ec29033..f2c3e22 100755 (executable)
@@ -4,6 +4,6 @@
 setup_switch() { return 0; }
 
 . /etc/functions.sh
-include network
+include /lib/network
 setup_switch
 /sbin/wifi
index 1334ee8..073e80d 100755 (executable)
@@ -3,7 +3,7 @@
 
 [ $# = 0 ] && { echo "  $0 <group>"; exit; }
 . /etc/functions.sh
-include network
+include /lib/network
 scan_interfaces
 
 cfg=$1
index b228eed..4a3ec8c 100755 (executable)
@@ -30,7 +30,7 @@ config_cb() {
 }
 
 config_load wireless
-include wifi
+include /lib/wifi
 
 for device in $DEVICES; do (
        config_get iftype "$device" type
index a244e05..e048687 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 [ -z "$1" ] && echo "Error: should be run by udhcpc" && exit 1
 . /etc/functions.sh
-include network
+include /lib/network
 
 RESOLV_CONF="/tmp/resolv.conf"