diff options
author | Peter Palfrader <peter@palfrader.org> | 2015-02-18 16:10:31 +0100 |
---|---|---|
committer | Peter Palfrader <peter@palfrader.org> | 2015-02-18 16:11:42 +0100 |
commit | 83bb52e4ddeee287e448f7f65bdcd36a3a285779 (patch) | |
tree | 45ef49c97f31860681ef62299f6d9113d6556f6d /install-VM-grongo | |
parent | 41599461aa00610e1842fc72d8ac99812ace2edf (diff) |
fix indentation
Diffstat (limited to 'install-VM-grongo')
-rwxr-xr-x | install-VM-grongo | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/install-VM-grongo b/install-VM-grongo index f3599e0..0cebca9 100755 --- a/install-VM-grongo +++ b/install-VM-grongo @@ -33,37 +33,37 @@ ip6gateway=fe80:: basedir=/srv/vmstore check_installed() { - local p - for p in "$@"; do - if ! dpkg -l "$p" 2>/dev/null | grep -q '^ii'; then - echo >&2 "Error: package $p not installed:" - echo >&2 " apt-get install $*" - exit 1 - fi - done + local p + for p in "$@"; do + if ! dpkg -l "$p" 2>/dev/null | grep -q '^ii'; then + echo >&2 "Error: package $p not installed:" + echo >&2 " apt-get install $*" + exit 1 + fi + done } get_sshkey_fprs() { - local f - for f in etc/ssh/ssh_host*_key.pub; do - echo -n " " - ssh-keygen -l -f "$f" - done + local f + for f in etc/ssh/ssh_host*_key.pub; do + echo -n " " + ssh-keygen -l -f "$f" + done } do_cleanup() { - #echo "Proposed cleanup:" - local cnt - cnt=$((${#cleanup[*]}-1)) - #for i in $(seq ${cnt} -1 0); do - # echo " ${cleanup[$i]}" - #done - #echo "Press enter to commence cleanup." - #read - for i in $(seq ${cnt} -1 0); do - echo "* ${cleanup[$i]}" - eval "${cleanup[$i]}" || true - done - echo "done." + #echo "Proposed cleanup:" + local cnt + cnt=$((${#cleanup[*]}-1)) + #for i in $(seq ${cnt} -1 0); do + # echo " ${cleanup[$i]}" + #done + #echo "Press enter to commence cleanup." + #read + for i in $(seq ${cnt} -1 0); do + echo "* ${cleanup[$i]}" + eval "${cleanup[$i]}" || true + done + echo "done." } check_installed debootstrap debian-archive-keyring kpartx @@ -112,14 +112,14 @@ fi diskfileprefix="$basedir/$fqdn/" if [ -e "$diskfileprefix" ]; then - echo >&2 "Error: Disk directory $diskfileprefix already exists." - exit 1 + echo >&2 "Error: Disk directory $diskfileprefix already exists." + exit 1 fi target="/mnt/target-$guest" if [ -e "$target" ]; then - echo >&2 "Error: Directory $target already exists." - exit 1 + echo >&2 "Error: Directory $target already exists." + exit 1 fi @@ -148,9 +148,9 @@ if [ "$lvmsize" != "" ] ; then fi if [ "$(head -c 65536 "$rootdev" | sha1sum | awk '{print $1}')" != "1adc95bebe9eea8c112d40cd04ab7a8d75c4f961" ]; then - echo -n "Warning: Disk appears to be not be empty. Continue anyway? [y/N] " - read ans - [ "$ans" = "y" ] || exit 0 + echo -n "Warning: Disk appears to be not be empty. Continue anyway? [y/N] " + read ans + [ "$ans" = "y" ] || exit 0 fi ip6addr="$ip6prefix$hostno:1" |