forked from openstack-packages/tripleo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
0001-Use-packaged-template-directory-path.patch
51 lines (42 loc) · 1.55 KB
/
0001-Use-packaged-template-directory-path.patch
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
From ad3f29082e3e26124d21c4a546a9afc0288db071 Mon Sep 17 00:00:00 2001
From: James Slagle <[email protected]>
Date: Wed, 19 Mar 2014 07:09:41 -0400
Subject: [PATCH] Use packaged template directory
---
scripts/configure-vm | 5 +----
scripts/setup-network | 6 ++++--
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/scripts/configure-vm b/scripts/configure-vm
index 633b053..98e06b4 100755
--- a/scripts/configure-vm
+++ b/scripts/configure-vm
@@ -6,10 +6,7 @@ import random
import libvirt
-templatedir = os.path.join(
- os.path.dirname(
- os.path.dirname(
- os.path.abspath(__file__))), 'templates')
+templatedir="/usr/share/tripleo/templates"
def generate_bm_mac_address():
"""Generate an Ethernet MAC address suitable for baremetal testing."""
diff --git a/scripts/setup-network b/scripts/setup-network
index 1d7c228..0e12482 100755
--- a/scripts/setup-network
+++ b/scripts/setup-network
@@ -1,5 +1,7 @@
#!/bin/bash
-set -eu
+set -eux
+
+template_dir="/usr/share/tripleo/templates"
BASE=$(dirname $0)/../
BRIDGE_SUFFIX=${1:-''}
@@ -12,7 +14,7 @@ BRIDGE_NAME=brbm$BRIDGE_SUFFIX
(virsh net-list --persistent | grep "${BRIDGE_NAME} ") && virsh net-destroy ${BRIDGE_NAME}
(virsh net-list --inactive --persistent | grep "${BRIDGE_NAME} ") && virsh net-undefine ${BRIDGE_NAME}
-virsh net-define <(sed s/brbm/$BRIDGE_NAME/ $BASE/templates/brbm.xml)
+virsh net-define <(sed s/brbm/$BRIDGE_NAME/ $template_dir/brbm.xml)
virsh net-autostart ${BRIDGE_NAME}
virsh net-start ${BRIDGE_NAME}
--
1.9.3