summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Janczyk2008-06-11 15:46:54 +0200
committerMichael Janczyk2008-06-11 15:46:54 +0200
commit1aabbef2904c3c89b5f6902e7a0017f42e381463 (patch)
tree646bfae731f627309c92652d51a7effd007f7fa8
parentadded quotes for tftp port problem (not tested yet ticket #232). (diff)
downloadcore-1aabbef2904c3c89b5f6902e7a0017f42e381463.tar.gz
core-1aabbef2904c3c89b5f6902e7a0017f42e381463.tar.xz
core-1aabbef2904c3c89b5f6902e7a0017f42e381463.zip
removed function in init-hook since not needed
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1875 95ad53e4-c205-0410-b2fa-d234c58c8868
-rw-r--r--os-plugins/plugins/xen/init-hooks/10-have-nw-modules/xen.sh45
1 files changed, 21 insertions, 24 deletions
diff --git a/os-plugins/plugins/xen/init-hooks/10-have-nw-modules/xen.sh b/os-plugins/plugins/xen/init-hooks/10-have-nw-modules/xen.sh
index 47edd682..321b6a06 100644
--- a/os-plugins/plugins/xen/init-hooks/10-have-nw-modules/xen.sh
+++ b/os-plugins/plugins/xen/init-hooks/10-have-nw-modules/xen.sh
@@ -1,26 +1,23 @@
# configure Xen bridge xenbr0
-xenbr_config () {
- modprobe ${MODPRV} netloop
- local ipls
- local vifnum="0"
- local bridge="xenbr${vifnum}"
- local netdev="eth${vifnum}"
- local pdev="p${netdev}"
- local vdev="veth${vifnum}"
- local vif0="vif0.${vifnum}"
- # fixme: that is the mac address of main ethernet device
- local mac=`ip link show ${netdev} | grep 'link\/ether' | sed -e 's/.*ether \(..:..:..:..:..:..\).*/\1/'`
+modprobe ${MODPRV} netloop
+local ipls
+local vifnum="0"
+local bridge="xenbr${vifnum}"
+local netdev="eth${vifnum}"
+local pdev="p${netdev}"
+local vdev="veth${vifnum}"
+local vif0="vif0.${vifnum}"
+# fixme: that is the mac address of main ethernet device
+local mac=`ip link show ${netdev} | grep 'link\/ether' | sed -e 's/.*ether \(..:..:..:..:..:..\).*/\1/'`
- brctl addbr ${bridge}
- brctl stp ${bridge} off
- brctl setfd ${bridge} 0
- brctl addif ${bridge} ${vif0}
- for ipls in "${netdev} name ${pdev}" "${vdev} name ${netdev}" \
- "${pdev} down arp off" "${pdev} addr fe:ff:ff:ff:ff:ff" \
- "${netdev} addr ${mac} arp on" "${bridge} up" "${vif0} up" \
- "${pdev} up" "${netdev} up"; do
- ip link set ${ipls}
- done
- brctl addif ${bridge} ${pdev}
- exit 0
-}
+brctl addbr ${bridge}
+brctl stp ${bridge} off
+brctl setfd ${bridge} 0
+brctl addif ${bridge} ${vif0}
+for ipls in "${netdev} name ${pdev}" "${vdev} name ${netdev}" \
+ "${pdev} down arp off" "${pdev} addr fe:ff:ff:ff:ff:ff" \
+ "${netdev} addr ${mac} arp on" "${bridge} up" "${vif0} up" \
+ "${pdev} up" "${netdev} up"; do
+ ip link set ${ipls}
+done
+brctl addif ${bridge} ${pdev}