summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2017-02-08 11:06:46 -0800
committerMax Krummenacher <max.krummenacher@toradex.com>2017-02-08 20:11:11 +0100
commit09d113b63aecef18f9b5701764adf6efc232a3ec (patch)
treebcd3e35cb58a214f6539e65f0df3f75f5cac7c79
parent73070744ec7257d3ce3830a4ae3ed360871c22a1 (diff)
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 <stefan.agner@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
-rwxr-xr-xrecipes-core/fs-init/files/resizefs.sh2
1 files changed, 1 insertions, 1 deletions
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"