From 83bb52e4ddeee287e448f7f65bdcd36a3a285779 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Wed, 18 Feb 2015 16:10:31 +0100 Subject: fix indentation --- install-VM-grongo | 66 +++++++++++++++++++++++++++---------------------------- 1 file 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" -- cgit v1.2.3