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