From e96b57d8d67c41ba5ca540d3dc7270fbda6bdf00 Mon Sep 17 00:00:00 2001 From: Weezer Su Date: Mon, 30 Jan 2017 13:30:37 -0600 Subject: [PATCH] Typo on MD5SUM5 should be MD5SUMS fix the typo. and put it into silent mode. Change-Id: I3bdb7184d4c565de88b9aab936d9df718778657f --- multi-node-aio/setup-cobbler.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/multi-node-aio/setup-cobbler.sh b/multi-node-aio/setup-cobbler.sh index e60d5af6..8a12b9c4 100755 --- a/multi-node-aio/setup-cobbler.sh +++ b/multi-node-aio/setup-cobbler.sh @@ -95,7 +95,7 @@ update-rc.d cobblerd defaults cobbler signature update # Get ubuntu server image md5 hash file -wget -O /tmp/MD5SUM5 /tmp/MD5SUM5 http://releases.ubuntu.com/"${DEFAULT_IMAGE:0:5}"/MD5SUMS +wget -qO /tmp/MD5SUMS http://releases.ubuntu.com/"${DEFAULT_IMAGE:0:5}"/MD5SUMS # Get ubuntu server image, if the server image exists, compare the md5, rm and download new image if the hash is not # the same. @@ -103,7 +103,7 @@ mkdir_check "/var/cache/iso" pushd /var/cache/iso if [ -f "/var/cache/iso/ubuntu-"${DEFAULT_IMAGE}"-server-amd64.iso" ]; then md5=`md5sum ubuntu-"${DEFAULT_IMAGE}"-server-amd64.iso | awk '{ print $1 }'` - if ! grep ${md5} /tmp/MD5SUMS &>/dev/null ; then + if ! grep -q ${md5} /tmp/MD5SUMS ; then rm /var/cache/iso/ubuntu-"${DEFAULT_IMAGE}"-server-amd64.iso wget http://releases.ubuntu.com/"${DEFAULT_IMAGE:0:5}"/ubuntu-"${DEFAULT_IMAGE}"-server-amd64.iso fi