summaryrefslogtreecommitdiffstats
path: root/os-plugins/plugins/qemukvm/XX_qemukvm.sh
diff options
context:
space:
mode:
Diffstat (limited to 'os-plugins/plugins/qemukvm/XX_qemukvm.sh')
-rw-r--r--os-plugins/plugins/qemukvm/XX_qemukvm.sh56
1 files changed, 7 insertions, 49 deletions
diff --git a/os-plugins/plugins/qemukvm/XX_qemukvm.sh b/os-plugins/plugins/qemukvm/XX_qemukvm.sh
index 7dcaa254..e2d47a80 100644
--- a/os-plugins/plugins/qemukvm/XX_qemukvm.sh
+++ b/os-plugins/plugins/qemukvm/XX_qemukvm.sh
@@ -1,4 +1,4 @@
-# Copyright (c) 2008, 2009 - OpenSLX GmbH
+# Copyright (c) 2008..2010 - OpenSLX GmbH
#
# This program/file is free software distributed under the GPL version 2.
# See http://openslx.org/COPYING
@@ -11,52 +11,6 @@
# Script is included from init via the "." load function - thus it has all
# variables and functions available
-write_networking_conf ()
-{
-local natnetwork="192.168.101"
-local honetwork="192.168.102"
-echo "
-# udhcpd configuration file written by $0 during OpenSLX stage3 configuration
-
-# The start and end of the IP lease block
-start CNETWORK.20
-end CNETWORK.100
-
-# The interface that udhcpd will use
-interface NWIF
-
-# How long an offered address is reserved (leased) in seconds
-offer_time 6000
-
-# The location of the leases file
-lease_file /tmp/qemu-USER/udhcpd.leases
-
-# The location of the pid file
-pidfile /tmp/qemu-USER/udhcpd.pid
-
-opt dns ${domain_name_servers}
-option subnet 255.255.255.0
-opt router CNETWORK.254
-opt wins CNETWORK.10
-option domain virtual.site ${domain_name}
-
-# Additional options known to udhcpd
-#subnet #timezone
-#router #timesvr
-#namesvr #dns
-#logsvr #cookiesvr
-#lprsvr #bootsize
-#domain #swapsvr
-#rootpath #ipttl
-#mtu #broadcast
-#wins #lease
-#ntpsrv #tftp
-#bootfile
-" >/mnt/etc/opt/openslx/udhcpd.qemukvm
-echo -e "nataddress=${natnetwork}.254/24\nhoaddress=${honetwork}.254/24" \
- >/mnt/etc/opt/openslx/network.qemukvm
-}
-
# check if the configuration file is available
if [ -e /initramfs/plugin-conf/qemukvm.conf ]; then
@@ -111,8 +65,12 @@ ${qemukvm_imagesrc}." nonfatal
testmkd /mnt/etc/opt/openslx
cp /mnt/opt/openslx/plugin-repo/qemukvm/run-virt.include \
/mnt/etc/opt/openslx/run-qemukvm.include
- # create a template udhcpd configuration file
- write_networking_conf
+ # create a network configuration template (variables should be setable in
+ # the future, see vmware plugin)
+ natnetwork="192.168.101"
+ honetwork="192.168.102"
+ echo -e "nataddress=${natnetwork}.254/24\nhoaddress=${honetwork}.254/24" \
+ >/mnt/etc/opt/openslx/network.qemukvm
# copy the runlevel script (proper place for all distros??)
cp /mnt/opt/openslx/plugin-repo/qemukvm/qemukvm /mnt/etc/init.d