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