2012-01-30 14:20:02 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
2013-01-11 01:28:48 +01:00
|
|
|
NM_CONFIG_DIR=/etc/NetworkManager/system-connections
|
2017-09-30 03:17:14 +02:00
|
|
|
if [ -d $NM_CONFIG_DIR ] && [ ! -h $NM_CONFIG_DIR ]; then
|
2012-01-30 14:20:02 +01:00
|
|
|
mkdir -p /rw/config/NM-system-connections
|
2013-01-11 01:28:48 +01:00
|
|
|
mv $NM_CONFIG_DIR/* /rw/config/NM-system-connections/ 2> /dev/null || true
|
|
|
|
rmdir $NM_CONFIG_DIR
|
|
|
|
ln -s /rw/config/NM-system-connections $NM_CONFIG_DIR
|
2012-01-30 14:20:02 +01:00
|
|
|
fi
|
|
|
|
|
2015-11-28 17:00:36 +01:00
|
|
|
# Do not manage xen-provided network devices
|
|
|
|
unmanaged_devices=mac:fe:ff:ff:ff:ff:ff
|
|
|
|
#for mac in `xenstore-ls device/vif | grep mac | cut -d= -f2 | tr -d '" '`; do
|
|
|
|
# unmanaged_devices="$unmanaged_devices;mac:$mac"
|
|
|
|
#done
|
2017-03-28 23:19:12 +02:00
|
|
|
sed -r -i -e "s/^#?unmanaged-devices=.*/unmanaged-devices=$unmanaged_devices/" /etc/NetworkManager/NetworkManager.conf
|
|
|
|
sed -r -i -e "s/^#?plugins=.*/plugins=keyfile/" /etc/NetworkManager/NetworkManager.conf
|
2015-11-28 17:00:36 +01:00
|
|
|
|
2012-01-30 14:20:02 +01:00
|
|
|
exit 0
|