summaryrefslogtreecommitdiffstats
path: root/os-plugins/plugins/vmware/init-hooks
diff options
context:
space:
mode:
Diffstat (limited to 'os-plugins/plugins/vmware/init-hooks')
-rwxr-xr-xos-plugins/plugins/vmware/init-hooks/60-have-servconfig/vm-dhcpd.sh18
1 files changed, 11 insertions, 7 deletions
diff --git a/os-plugins/plugins/vmware/init-hooks/60-have-servconfig/vm-dhcpd.sh b/os-plugins/plugins/vmware/init-hooks/60-have-servconfig/vm-dhcpd.sh
index 6bdfb8f1..4d10965d 100755
--- a/os-plugins/plugins/vmware/init-hooks/60-have-servconfig/vm-dhcpd.sh
+++ b/os-plugins/plugins/vmware/init-hooks/60-have-servconfig/vm-dhcpd.sh
@@ -10,12 +10,16 @@
# General information about OpenSLX can be found at http://openslx.org
#
# Init hook to create a bridge on the active network interface
-# (should be kept identical to the files of virtualbox and qemukvm plugins)
+# (should be kept identical in vmware, virtualbox and qemukvm plugins)
#############################################################################
+. /etc/openslx.conf
+
+CONFDIR=/mnt/${OPENSLX_DEFAULT_CONFDIR}
+testmkd ${CONFDIR}
+
# configuring dhcpd stub for virtual networks
-testmkd /mnt/etc/opt/openslx
-echo "
+cat > ${CONFDIR}/udhcpd.conf << EOF
# general udhcpd configuration file for virtual machines written by
# $0 during OpenSLX stage3 configuration
@@ -35,10 +39,10 @@ lease_file LEASEFILE
# location of the pid file
pidfile PIDFILE
-opt dns ${domain_name_servers}
+option dns ${domain_name_servers}
option subnet 255.255.255.0
-opt router CNETWORK.254
-opt wins CNETWORK.10
+option router CNETWORK.1
+option wins CNETWORK.10
option domain virtual.site ${domain_name}
# additional options known to udhcpd
@@ -53,4 +57,4 @@ option domain virtual.site ${domain_name}
#wins #lease
#ntpsrv #tftp
#bootfile
-" >/mnt/etc/opt/openslx/udhcpd.conf
+EOF