From 5abc21fb7e0297909021815371b838e79367690a Mon Sep 17 00:00:00 2001 From: oblique Date: Tue, 17 Dec 2013 21:39:19 +0200 Subject: [PATCH] Check if the directory of NetworkManager.conf exists and not the actual file --- create_ap | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/create_ap b/create_ap index 9d4aafa..dbd80fa 100755 --- a/create_ap +++ b/create_ap @@ -78,7 +78,8 @@ ADDED_UNMANAGED=0 NETWORKMANAGER_CONF=/etc/NetworkManager/NetworkManager.conf networkmanager_add_unmanaged() { - [[ ! -f ${NETWORKMANAGER_CONF} ]] && return + [[ ! -d ${NETWORKMANAGER_CONF%/*} ]] && return + [[ -f ${NETWORKMANAGER_CONF} ]] || touch ${NETWORKMANAGER_CONF} if [[ -z "$2" ]]; then MAC=$(get_macaddr "$1") else