vm/network: create NetworkManager config link only once
This commit is contained in:
parent
63da3b15a0
commit
ff47b0a8b8
@ -1,10 +1,11 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
if [ -d /etc/NetworkManager/system-connections ]; then
|
NM_CONFIG_DIR=/etc/NetworkManager/system-connections
|
||||||
|
if [ -d $NM_CONFIG_DIR -a ! -h $NM_CONFIG_DIR ]; then
|
||||||
mkdir -p /rw/config/NM-system-connections
|
mkdir -p /rw/config/NM-system-connections
|
||||||
mv /etc/NetworkManager/system-connections/* /rw/config/NM-system-connections/ 2> /dev/null || true
|
mv $NM_CONFIG_DIR/* /rw/config/NM-system-connections/ 2> /dev/null || true
|
||||||
rmdir /etc/NetworkManager/system-connections
|
rmdir $NM_CONFIG_DIR
|
||||||
ln -s /rw/config/NM-system-connections /etc/NetworkManager/system-connections
|
ln -s /rw/config/NM-system-connections $NM_CONFIG_DIR
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
Loading…
Reference in New Issue
Block a user