summaryrefslogtreecommitdiffstats
path: root/networkmanager/post-install
blob: 6085d580b6174d3f7d1ee1012d19112965bf6867 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh

if ! grep NetworkManager /etc/rc.d/init.d/network 2>&1 > /dev/null ; then
	mv /etc/rc.d/init.d/network{,.old}
	mv /etc/rc.d/init.d/network{.nm,}
else
	rm -f /etc/rc.d/init.d/network.nm
fi

if ! grep MANAGER /etc/sysconfig/network 2>&1 > /dev/null; then
	mv /etc/sysconfig/network{,.old}
	mv /etc/sysconfig/network{.nm,}
	sed "s|HOSTNAME='NuTyX'|HOSTNAME='$HOSTNAME'|" -i /etc/sysconfig/network
else
	rm -f /etc/sysconfig/network.nm
fi