blob: 0d137056ecfa7a92b4fff4ce88504ed6da13c15e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
setup_dhcp() {
# First: let's see whether the package isc-dhcp-client is installed
# (we do not like it due to udp checksum failures using virtIO)
echo "# Checking dhcp configuration / utilities..."
if [ $(which dhclient) ]; then
echo -n "# dhclient detected. Uninstalling package isc-dhcp-client..."
dpkg --purge isc-dhcp-client
ERR=$?
if [ "$ERR" -ne 0 ]; then
echo
echo "# WARNING: Could not uninstall isc-dhcp-client (dhclient)!"
echo "# Trying to install pump anyway, but make sure"
echo "# pump is functional!"
else
echo " ok."
fi
fi
if [ ! $(which pump) ]; then
echo -n "# Installing pump..."
apt-get install pump
if [ "$ERR" -ne 0 ]; then
echo
echo "# WARNING: Could install isc-dhcp-client (dhclient)!"
echo "# Trying to install pump anyway, but make sure"
echo "# pump is functional!"
else
echo " ok."
fi
fi
}
|