From 09d113b63aecef18f9b5701764adf6efc232a3ec Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Wed, 8 Feb 2017 11:06:46 -0800 Subject: fs-init: do not reload daemon configuration In case the resizefs.sh script ends quite fast, the system might still be in boot sequence. Removing a systemd service can be problematic in that case: It seems that systemd looses the state of .device units, and some services depend on such units (namely serial consoles such as serial-getty@ttymxc0.service). The following sequence shows this problem: Jan 12 00:16:45 apalis-imx6 sh[399]: Removed /etc/systemd/system/multi-user.target.wants/resizefs.service. Jan 12 00:16:45 apalis-imx6 systemd[1]: Reloading. Jan 12 00:16:45 apalis-imx6 root[704]: resizing mmcblk0p2 finished, new size is 3755M ... Jan 19 00:04:08 apalis-imx6 systemd[1]: dev-ttymxc0.device: Job dev-ttymxc0.device/start timed out. Jan 19 00:04:08 apalis-imx6 systemd[1]: Timed out waiting for device dev-ttymxc0.device. Jan 19 00:04:08 apalis-imx6 systemd[1]: Dependency failed for Serial Getty on ttymxc0. (the time has been updated between this to events, but that does not influence the issue) Using --no-reload avoids the "Reloading." message above and seems to not cause such issues anymore. Signed-off-by: Stefan Agner Acked-by: Max Krummenacher --- recipes-core/fs-init/files/resizefs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-core/fs-init/files/resizefs.sh b/recipes-core/fs-init/files/resizefs.sh index 8f066d1..6b04eb6 100755 --- a/recipes-core/fs-init/files/resizefs.sh +++ b/recipes-core/fs-init/files/resizefs.sh @@ -47,7 +47,7 @@ FSSIZEMEG=`expr $FSSIZE / 2 / 1024`"M" resize2fs /dev/$PART $FSSIZEMEG #job done, remove it from systemd services -systemctl disable resizefs.service +systemctl --no-reload disable resizefs.service logger "resizing $PART finished, new size is $FSSIZEMEG" -- cgit v1.2.3