From 69541cb2bcd643c6d11186ab188c4ef14838b8da Mon Sep 17 00:00:00 2001 From: oblique Date: Sat, 13 Feb 2016 22:04:56 +0200 Subject: [PATCH] Send SIGHUP to NetworkManager to reload its config --- create_ap | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/create_ap b/create_ap index 1716957..055d1ed 100755 --- a/create_ap +++ b/create_ap @@ -511,6 +511,9 @@ networkmanager_add_unmanaged() { ADDED_UNMANAGED="${ADDED_UNMANAGED} ${1} " mutex_unlock + local nm_pid=$(pidof NetworkManager) + [[ -n "$nm_pid" ]] && kill -HUP $nm_pid + return 0 } @@ -551,14 +554,21 @@ networkmanager_rm_unmanaged() { ADDED_UNMANAGED="${ADDED_UNMANAGED/ ${1} /}" mutex_unlock + local nm_pid=$(pidof NetworkManager) + [[ -n "$nm_pid" ]] && kill -HUP $nm_pid + return 0 } networkmanager_fix_unmanaged() { [[ -f ${NETWORKMANAGER_CONF} ]] || return + mutex_lock sed -e "/^unmanaged-devices=.*/d" -i ${NETWORKMANAGER_CONF} mutex_unlock + + local nm_pid=$(pidof NetworkManager) + [[ -n "$nm_pid" ]] && kill -HUP $nm_pid } networkmanager_rm_unmanaged_if_needed() {