Commit 44c00301 authored by Łukasz Nowak's avatar Łukasz Nowak

packer: Fix debian8 image generation

parent e3cfd3ec
......@@ -16,8 +16,8 @@
"accelerator": "kvm",
"disk_size": "{{ user `disk_size`}}",
"iso_url": "http://cdimage.debian.org/debian-cd/8.3.0/amd64/iso-cd/debian-8.3.0-amd64-netinst.iso",
"iso_checksum": "a9b490b4215d1e72e876b031dafa7184",
"iso_url": "http://cdimage.debian.org/debian-cd/8.7.1/amd64/iso-cd/debian-8.7.1-amd64-netinst.iso",
"iso_checksum": "453312bf56fc45669fec5ebc0f025ac7",
"iso_checksum_type": "md5",
"http_directory": "http",
......
......@@ -16,8 +16,8 @@
"accelerator": "kvm",
"disk_size": "{{ user `disk_size`}}",
"iso_url": "http://cdimage.debian.org/debian-cd/8.6.0/amd64/iso-cd/debian-8.6.0-amd64-netinst.iso",
"iso_checksum": "e9f61bf327db6d8f7cee05a99f2353cc",
"iso_url": "http://cdimage.debian.org/debian-cd/8.7.1/amd64/iso-cd/debian-8.7.1-amd64-netinst.iso",
"iso_checksum": "453312bf56fc45669fec5ebc0f025ac7",
"iso_checksum_type": "md5",
"http_directory": "http",
......
......@@ -4,28 +4,28 @@ cat << EOF > /root/run-test
BOOTSTRAP="/root/start-bootstrap"
FILE="/etc/cron.d/ansible-vm-bootstrap"
if [[ ! -f "$BOOTSTRAP" ]]
if [[ ! -f "\$BOOTSTRAP" ]]
then
exit 1
fi
# Check if playbook has been correctly extracted
COUNT=$(ls /opt/slapos.playbook | wc -l)
if [[ ! $COUNT -gt 1 ]]
COUNT=\$(ls /opt/slapos.playbook | wc -l)
if [[ ! \$COUNT -gt 1 ]]
then
rm -f $FILE
rm -f \$FILE
rm -f /opt/slapos.playbook/playbook.tar.gz
fi
lf=/tmp/pidLockFile
cat /dev/null >> $lf
read lastPID < $lf
cat /dev/null >> \$lf
read lastPID < \$lf
# if lastPID is not null and a process with that pid exists , exit
[ ! -z "$lastPID" -a -d /proc/$lastPID ] && exit
[ ! -z "\$lastPID" -a -d /proc/\$lastPID ] && exit
# save my pid in the lock file
echo $$ > $lf
echo \$\$ > \$lf
if [[ -f "$FILE" ]] && [[ -s "$FILE" ]] && [[ $COUNT -gt 1 ]]
if [[ -f "\$FILE" ]] && [[ -s "\$FILE" ]] && [[ \$COUNT -gt 1 ]]
then
rm /etc/cron.d/vm-boostrap
fi
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment