File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Whiteout root
4+ count=$( df --sync -kP / | tail -n1 | awk -F ' ' ' {print $4}' )
5+ count=$(( count - 1 ))
6+ dd if=/dev/zero of=/tmp/whitespace bs=1M count=$count || echo " dd exit code $? is suppressed" ;
7+ rm /tmp/whitespace
8+
9+ # Whiteout /boot
10+ count=$( df --sync -kP /boot | tail -n1 | awk -F ' ' ' {print $4}' )
11+ count=$(( count - 1 ))
12+ dd if=/dev/zero of=/boot/whitespace bs=1M count=$count || echo " dd exit code $? is suppressed" ;
13+ rm /boot/whitespace
Original file line number Diff line number Diff line change 426426 "type" : " ansible" ,
427427 "user" : " {{user `ssh_username`}}"
428428 },
429+ {
430+ "environment_vars" : [
431+ " ENABLE_DISK_PACKING={{user `enable_disk_packing`}}"
432+ ],
433+ "execute_command" : " if [[ \" ${ENABLE_DISK_PACKING}\" == *\" true\" * ]]; then chmod +x {{ .Path }}; sudo {{ .Path }}; fi" ,
434+ "script" : " ./packer/files/ova/scripts/optimize-disk.sh" ,
435+ "type" : " shell"
436+ },
429437 {
430438 "arch" : " {{user `goss_arch`}}" ,
431439 "download_path" : " {{user `goss_download_path`}}" ,
492500 "datastore" : " " ,
493501 "destroy" : " false" ,
494502 "disk_size" : " 20480" ,
503+ "enable_disk_packing" : " true" ,
495504 "existing_ansible_ssh_args" : " {{env `ANSIBLE_SSH_ARGS`}}" ,
496505 "export_manifest" : " none" ,
497506 "folder" : " " ,
You can’t perform that action at this time.
0 commit comments