summaryrefslogtreecommitdiffstats
path: root/src/os-plugins/plugins/vmware/init-hooks/60-have-servconfig/vm-dhcpd.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/os-plugins/plugins/vmware/init-hooks/60-have-servconfig/vm-dhcpd.sh')
-rwxr-xr-xsrc/os-plugins/plugins/vmware/init-hooks/60-have-servconfig/vm-dhcpd.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/os-plugins/plugins/vmware/init-hooks/60-have-servconfig/vm-dhcpd.sh b/src/os-plugins/plugins/vmware/init-hooks/60-have-servconfig/vm-dhcpd.sh
index 5e76c1f0..1717a8db 100755
--- a/src/os-plugins/plugins/vmware/init-hooks/60-have-servconfig/vm-dhcpd.sh
+++ b/src/os-plugins/plugins/vmware/init-hooks/60-have-servconfig/vm-dhcpd.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (c) 2010,2011 - OpenSLX GmbH
+# Copyright (c) 2010..2013 - OpenSLX GmbH
#
# This program is free software distributed under the GPL version 2.
# See http://openslx.org/COPYING
@@ -18,9 +18,10 @@
CONFDIR=/mnt/${OPENSLX_DEFAULT_CONFDIR}
testmkd ${CONFDIR}
-# read the DNS configuration
+# read the DNS configuration and if available set WPAD configuration
. /etc/initramfs-setup
[ -z "${domain_name_servers}" ] && domain_name_servers="8.8.8.8"
+[ -n "${wpad}" ] && wpad_config="option wpad ${wpad}"
# configuring dhcpd stub for virtual networks
cat > ${CONFDIR}/udhcpd.conf << EOF
@@ -48,6 +49,7 @@ option subnet 255.255.255.0
option router CNETWORK.1
option wins CNETWORK.10
option domain virtual.site ${domain_name}
+${wpad_config}
# additional options known to udhcpd
#subnet #timezone
@@ -60,5 +62,5 @@ option domain virtual.site ${domain_name}
#mtu #broadcast
#wins #lease
#ntpsrv #tftp
-#bootfile
+#bootfile #wpad
EOF