Typo on MD5SUM5 should be MD5SUMS
fix the typo. and put it into silent mode. Change-Id: I3bdb7184d4c565de88b9aab936d9df718778657f
This commit is contained in:
parent
e2cf647aac
commit
e96b57d8d6
@ -95,7 +95,7 @@ update-rc.d cobblerd defaults
|
|||||||
cobbler signature update
|
cobbler signature update
|
||||||
|
|
||||||
# Get ubuntu server image md5 hash file
|
# 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
|
# Get ubuntu server image, if the server image exists, compare the md5, rm and download new image if the hash is not
|
||||||
# the same.
|
# the same.
|
||||||
@ -103,7 +103,7 @@ mkdir_check "/var/cache/iso"
|
|||||||
pushd /var/cache/iso
|
pushd /var/cache/iso
|
||||||
if [ -f "/var/cache/iso/ubuntu-"${DEFAULT_IMAGE}"-server-amd64.iso" ]; then
|
if [ -f "/var/cache/iso/ubuntu-"${DEFAULT_IMAGE}"-server-amd64.iso" ]; then
|
||||||
md5=`md5sum ubuntu-"${DEFAULT_IMAGE}"-server-amd64.iso | awk '{ print $1 }'`
|
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
|
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
|
wget http://releases.ubuntu.com/"${DEFAULT_IMAGE:0:5}"/ubuntu-"${DEFAULT_IMAGE}"-server-amd64.iso
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user