aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2022-04-22 16:03:08 +0000
committerCy Schubert <cy@FreeBSD.org>2022-04-22 16:15:49 +0000
commit1452bfcd9bbcb2f5bbb89fa38d01ce51dd9b6d44 (patch)
tree6ed7146367dcc0589ba8c89f3bcf3b778cff6c67
parent797b94504f4fd457aef694c236705c1bd850f2f7 (diff)
-rwxr-xr-xlibexec/rc/rc.d/hostapd8
1 files changed, 5 insertions, 3 deletions
diff --git a/libexec/rc/rc.d/hostapd b/libexec/rc/rc.d/hostapd
index 7e1611350438..d2d8dd253efa 100755
--- a/libexec/rc/rc.d/hostapd
+++ b/libexec/rc/rc.d/hostapd
@@ -15,9 +15,11 @@ command=${hostapd_program}
start_postcmd="hostapd_poststart"
hostapd_poststart() {
- ifconfig ${ifn} down
- sleep 2
- ifconfig ${ifn} up
+ if [ -n "$ifn" ]; then
+ ifconfig ${ifn} down
+ sleep 2
+ ifconfig ${ifn} up
+ fi
}
ifn="$2"