mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Add macvlan support
This commit is contained in:
parent
40fdd921b9
commit
9f8643647e
255 changed files with 134998 additions and 0 deletions
45
luci-base/root/sbin/luci-reload
Executable file
45
luci-base/root/sbin/luci-reload
Executable file
|
@ -0,0 +1,45 @@
|
|||
#!/bin/sh
|
||||
. /lib/functions.sh
|
||||
|
||||
apply_config() {
|
||||
config_get init "$1" init
|
||||
config_get exec "$1" exec
|
||||
config_get test "$1" test
|
||||
|
||||
echo "$2" > "/var/run/luci-reload-status"
|
||||
|
||||
[ -n "$init" ] && reload_init "$2" "$init" "$test"
|
||||
[ -n "$exec" ] && reload_exec "$2" "$exec" "$test"
|
||||
}
|
||||
|
||||
reload_exec() {
|
||||
local service="$1"
|
||||
local ok="$3"
|
||||
set -- $2
|
||||
local cmd="$1"; shift
|
||||
|
||||
[ -x "$cmd" ] && {
|
||||
echo "Reloading $service... "
|
||||
( $cmd "$@" ) 2>/dev/null 1>&2
|
||||
[ -n "$ok" -a "$?" != "$ok" ] && echo '!!! Failed to reload' $service '!!!'
|
||||
}
|
||||
}
|
||||
|
||||
reload_init() {
|
||||
[ -x /etc/init.d/$2 ] && /etc/init.d/$2 enabled && {
|
||||
echo "Reloading $1... "
|
||||
/etc/init.d/$2 reload >/dev/null 2>&1
|
||||
[ -n "$3" -a "$?" != "$3" ] && echo '!!! Failed to reload' $1 '!!!'
|
||||
}
|
||||
}
|
||||
|
||||
lock "/var/run/luci-reload"
|
||||
|
||||
config_load ucitrack
|
||||
|
||||
for i in $*; do
|
||||
config_foreach apply_config $i $i
|
||||
done
|
||||
|
||||
rm -f "/var/run/luci-reload-status"
|
||||
lock -u "/var/run/luci-reload"
|
Loading…
Add table
Add a link
Reference in a new issue