diff options
author | Richard Ipsum <richard.ipsum@codethink.co.uk> | 2015-03-04 11:35:04 +0000 |
---|---|---|
committer | Richard Ipsum <richard.ipsum@codethink.co.uk> | 2015-03-04 15:36:12 +0000 |
commit | cb468d8259022c8f5f8aa19e9588a34cd3f25153 (patch) | |
tree | 72d42a1cf6e9317e89d631aeec0223d3f075ec75 | |
parent | f9498a51fe4c90933abe56d9f44a6a5c79dada18 (diff) | |
download | definitions-cb468d8259022c8f5f8aa19e9588a34cd3f25153.tar.gz |
openstack.configure: Use $ROOT
-rw-r--r-- | openstack.configure | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/openstack.configure b/openstack.configure index a8ae5554..33184290 100644 --- a/openstack.configure +++ b/openstack.configure @@ -25,6 +25,8 @@ set -u # # TODO: ipv6 +ROOT="$1" + octet='\(\(2[0-5]\?[0-5]\?\)\|\(1[0-9]\?[0-9]\?\)\|\([0-9]\)\)' valid_ip() { @@ -46,7 +48,7 @@ append_host() { if ! valid_ip "$ip"; then echo "ip, '$ip'" is malformed >&2; exit 1; fi if ! valid_hostname "$hostname"; then echo "hostname, '$hostname'" is malformed >&2; exit 1; fi - echo "$ip" "$hostname" >> /etc/hosts + echo "$ip" "$hostname" >> "$ROOT"/etc/hosts } add_hosts() { @@ -69,7 +71,7 @@ add_hosts() { done } -echo >> /etc/hosts # insert line break +echo >> "$ROOT"/etc/hosts # insert line break append_host "$CONTROLLER_NODE_IP" "controller.$STACK_ID" |