Check if the directory of NetworkManager.conf exists and not the actual file

This commit is contained in:
oblique 2013-12-17 21:39:19 +02:00
parent 3c3b3b32d6
commit 5abc21fb7e

View File

@ -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