aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211/files
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2019-12-05 21:17:58 +0100
committerDaniel Golle <daniel@makrotopia.org>2019-12-08 19:53:11 +0100
commit3ee767086d306f8095b7301262b0fe053a0b9f50 (patch)
treedfcb70bf27cac2df9229ab97643f9620bd6d43c8 /package/kernel/mac80211/files
parent24b97579d20b6ac6df81654a953386d2912fc324 (diff)
downloadupstream-3ee767086d306f8095b7301262b0fe053a0b9f50.tar.gz
upstream-3ee767086d306f8095b7301262b0fe053a0b9f50.tar.bz2
upstream-3ee767086d306f8095b7301262b0fe053a0b9f50.zip
mac80211: don't call md5sum on non-existing file
If no AP is configured, hostapd-${phy}.conf is not being created, hence md5sum fails and causes log pollution: netifd: radio1 (3183): md5sum: can't open '/var/run/hostapd-phy1.conf': No such file or directoy Hence make sure the file exists when calling md5sum. Fixes: a5bc9787d4 ("mac80211: add support for dynamically reconfiguring wifi") Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'package/kernel/mac80211/files')
-rw-r--r--package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
index 06244bf0e3..18033e9d56 100644
--- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
+++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
@@ -925,7 +925,7 @@ drv_mac80211_setup() {
for_each_interface "sta adhoc mesh monitor" mac80211_prepare_vif
NEWAPLIST=
for_each_interface "ap" mac80211_prepare_vif
- NEW_MD5=$(md5sum ${hostapd_conf_file})
+ NEW_MD5=$(test -e "${hostapd_conf_file}" && md5sum ${hostapd_conf_file})
OLD_MD5=$(uci -q -P /var/state get wireless._${phy}.md5)
if [ "${NEWAPLIST}" != "${OLDAPLIST}" ]; then
mac80211_vap_cleanup hostapd "${OLDAPLIST}"