Check if the directory of NetworkManager.conf exists and not the actual file
This commit is contained in:
parent
3c3b3b32d6
commit
5abc21fb7e
@ -78,7 +78,8 @@ ADDED_UNMANAGED=0
|
|||||||
NETWORKMANAGER_CONF=/etc/NetworkManager/NetworkManager.conf
|
NETWORKMANAGER_CONF=/etc/NetworkManager/NetworkManager.conf
|
||||||
|
|
||||||
networkmanager_add_unmanaged() {
|
networkmanager_add_unmanaged() {
|
||||||
[[ ! -f ${NETWORKMANAGER_CONF} ]] && return
|
[[ ! -d ${NETWORKMANAGER_CONF%/*} ]] && return
|
||||||
|
[[ -f ${NETWORKMANAGER_CONF} ]] || touch ${NETWORKMANAGER_CONF}
|
||||||
if [[ -z "$2" ]]; then
|
if [[ -z "$2" ]]; then
|
||||||
MAC=$(get_macaddr "$1")
|
MAC=$(get_macaddr "$1")
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user