Skip to content

Commit

Permalink
netifd: check if /sbin/wifi exists before calling it
Browse files Browse the repository at this point in the history
Avoid harmless error from network script by checking presence of
now-optional wifi support script, most notably confusing users of x86
snapshots.

Fixes: openwrt#14964
Signed-off-by: Andris PE <[email protected]>
Link: openwrt#14986
Signed-off-by: Robert Marko <[email protected]>
  • Loading branch information
Andris PE authored and robimarko committed Nov 30, 2024
1 parent 86f489c commit 207bfee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package/network/config/netifd/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=netifd
PKG_RELEASE:=1
PKG_RELEASE:=2

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git
Expand Down
4 changes: 2 additions & 2 deletions package/network/config/netifd/files/etc/init.d/network
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ reload_service() {

init_switch
ubus call network reload || rv=1
/sbin/wifi reload_legacy
[ -x /sbin/wifi ] && /sbin/wifi reload_legacy
return $rv
}

stop_service() {
/sbin/wifi down
[ -x /sbin/wifi ] && /sbin/wifi down
ifdown -a
sleep 1
}
Expand Down

0 comments on commit 207bfee

Please sign in to comment.