File tree Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Expand file tree Collapse file tree 2 files changed +24
-2
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`}}" ,
526534 "resource_pool" : " " ,
527535 "username" : " " ,
528536 "vcenter_server" : " " ,
529- "vsphere_guest_os_type" : null
537+ "vsphere_guest_os_type" : null ,
538+ "enable_disk_packing" : " true"
530539 }
531- }
540+ }
You can’t perform that action at this time.
0 commit comments