From 90a66357153e2fce407cfcac5960d6e5cc259c5e 2018-12-19 11:27:51 From: Yannick Schinko Date: 2018-12-19 11:27:51 Subject: [PATCH] No need to check if the service exists If this snippet is included, the service exists --- diff --git a/files/firstboot/23-restart-dphys-swapfile.sh b/files/firstboot/23-restart-dphys-swapfile.sh index 9f9d742..32c8638 100644 --- a/files/firstboot/23-restart-dphys-swapfile.sh +++ b/files/firstboot/23-restart-dphys-swapfile.sh @@ -1,7 +1,5 @@ # Restart dphys-swapfile service if it exists -if systemctl list-units | grep -q dphys-swapfile ; then - logger -t "rc.firstboot" "Restarting dphys-swapfile" +logger -t "rc.firstboot" "Restarting dphys-swapfile" - systemctl enable dphys-swapfile - systemctl restart dphys-swapfile -fi +systemctl enable dphys-swapfile +systemctl restart dphys-swapfile