remove network-manager and configure networkd on arm systems using network-manager
This commit is contained in:
parent
0df1a07a29
commit
8dd91209de
22
install
22
install
@ -286,4 +286,26 @@ cat << EOF > ${ioniceCron}
|
|||||||
EOF
|
EOF
|
||||||
chmod 600 ${ioniceCron}
|
chmod 600 ${ioniceCron}
|
||||||
|
|
||||||
|
# remove networkmanager and configure networkd
|
||||||
|
if [ ${version} -gt 4 ]; then
|
||||||
|
nic="$(awk '/^.*NetworkManager.*dhcp.*\(.*\)/ { print $9 }' /var/log/syslog | sort | uniq | sed 's/[^a-zA-Z0-9]//g' | tail -1)"
|
||||||
|
|
||||||
|
if [ -n "${nic}" ]; then
|
||||||
|
echo "Removing network-manager ..."
|
||||||
|
apt-get -y --autoremove purge network-manager
|
||||||
|
|
||||||
|
echo "Configure ${nic} to use networkd..."
|
||||||
|
echo -e "[Match]\nName=${nic}\n\n[Network]\nDHCP=both" > /etc/systemd/network/openmediavault-${nic,,}.network
|
||||||
|
|
||||||
|
echo "Enable networkd ..."
|
||||||
|
systemctl enable systemd-networkd
|
||||||
|
|
||||||
|
echo "Enable simple dns ..."
|
||||||
|
rm -f /etc/resolv.conf
|
||||||
|
echo "nameserver 1.1.1.1" > /etc/resolv.conf
|
||||||
|
|
||||||
|
echo "It is recommended to run omv-firstaid or setup the network adapter in the openmediavault web interface."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user