mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2025-03-03 12:10:55 +00:00
netifd: check if /sbin/wifi exists before calling it
Avoid harmless error from network script by checking presence of now-optional wifi support script, most notably confusing users of x86 snapshots. Fixes: #14964 Signed-off-by: Andris PE <neandris@gmail.com> Link: https://github.com/openwrt/openwrt/pull/14986 Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
parent
86f489c02f
commit
207bfee855
@ -1,7 +1,7 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=netifd
|
PKG_NAME:=netifd
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git
|
PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git
|
||||||
|
@ -30,12 +30,12 @@ reload_service() {
|
|||||||
|
|
||||||
init_switch
|
init_switch
|
||||||
ubus call network reload || rv=1
|
ubus call network reload || rv=1
|
||||||
/sbin/wifi reload_legacy
|
[ -x /sbin/wifi ] && /sbin/wifi reload_legacy
|
||||||
return $rv
|
return $rv
|
||||||
}
|
}
|
||||||
|
|
||||||
stop_service() {
|
stop_service() {
|
||||||
/sbin/wifi down
|
[ -x /sbin/wifi ] && /sbin/wifi down
|
||||||
ifdown -a
|
ifdown -a
|
||||||
sleep 1
|
sleep 1
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user