From 958b7908f04797c1ba69f13c045907c0b70fac1f 2018-12-09 17:03:54 From: drtyhlpr Date: 2018-12-09 17:03:54 Subject: [PATCH] Added: dphys-swapfile autoresize --- diff --git a/files/firstboot/22-expandroot.sh b/files/firstboot/22-expandroot.sh index 235c411..c2590a2 100644 --- a/files/firstboot/22-expandroot.sh +++ b/files/firstboot/22-expandroot.sh @@ -66,3 +66,11 @@ EOF2 partprobe && resize2fs /dev/${ROOT_PART} && logger -t "rc.firstboot" "Root partition successfully resized." + +# Restart dphys-swapfile service if it exists +if systemctl list-units | grep -q dphys-swapfile ; then + if systemctl is-enabled dphys-swapfile ; then + logger -t "rc.firstboot" "Restarting dphys-swapfile" + systemctl restart dphys-swapfile + fi +fi