From da625de806a3e4a4a4986caedf8fbd2c4d3f1e75 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 24 Sep 2006 13:32:18 +0000 Subject: [PATCH] use absolute paths in include() shell function SVN-Revision: 4852 --- openwrt/package/base-files/default/etc/functions.sh | 2 +- openwrt/package/base-files/default/etc/hotplug.d/net/10-net | 2 +- openwrt/package/base-files/default/etc/init.d/S40network | 2 +- openwrt/package/base-files/default/sbin/ifdown | 2 +- openwrt/package/base-files/default/sbin/wifi | 2 +- .../package/base-files/default/usr/share/udhcpc/default.script | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/openwrt/package/base-files/default/etc/functions.sh b/openwrt/package/base-files/default/etc/functions.sh index 27b0a6d5fc9..ce22ed151c3 100755 --- a/openwrt/package/base-files/default/etc/functions.sh +++ b/openwrt/package/base-files/default/etc/functions.sh @@ -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 } diff --git a/openwrt/package/base-files/default/etc/hotplug.d/net/10-net b/openwrt/package/base-files/default/etc/hotplug.d/net/10-net index b5140758afe..0a24b052f3c 100644 --- a/openwrt/package/base-files/default/etc/hotplug.d/net/10-net +++ b/openwrt/package/base-files/default/etc/hotplug.d/net/10-net @@ -1,6 +1,6 @@ # Copyright (C) 2006 OpenWrt.org -include network +include /lib/network addif() { scan_interfaces diff --git a/openwrt/package/base-files/default/etc/init.d/S40network b/openwrt/package/base-files/default/etc/init.d/S40network index ec290335db7..f2c3e22859b 100755 --- a/openwrt/package/base-files/default/etc/init.d/S40network +++ b/openwrt/package/base-files/default/etc/init.d/S40network @@ -4,6 +4,6 @@ setup_switch() { return 0; } . /etc/functions.sh -include network +include /lib/network setup_switch /sbin/wifi diff --git a/openwrt/package/base-files/default/sbin/ifdown b/openwrt/package/base-files/default/sbin/ifdown index 1334ee82183..073e80d2dad 100755 --- a/openwrt/package/base-files/default/sbin/ifdown +++ b/openwrt/package/base-files/default/sbin/ifdown @@ -3,7 +3,7 @@ [ $# = 0 ] && { echo " $0 "; exit; } . /etc/functions.sh -include network +include /lib/network scan_interfaces cfg=$1 diff --git a/openwrt/package/base-files/default/sbin/wifi b/openwrt/package/base-files/default/sbin/wifi index b228eed8a05..4a3ec8cfef2 100755 --- a/openwrt/package/base-files/default/sbin/wifi +++ b/openwrt/package/base-files/default/sbin/wifi @@ -30,7 +30,7 @@ config_cb() { } config_load wireless -include wifi +include /lib/wifi for device in $DEVICES; do ( config_get iftype "$device" type diff --git a/openwrt/package/base-files/default/usr/share/udhcpc/default.script b/openwrt/package/base-files/default/usr/share/udhcpc/default.script index a244e05a157..e048687f746 100755 --- a/openwrt/package/base-files/default/usr/share/udhcpc/default.script +++ b/openwrt/package/base-files/default/usr/share/udhcpc/default.script @@ -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"