From 15b423ef9ae5bb58d916cceaa2dccfbd8443b173 Mon Sep 17 00:00:00 2001 From: Johannes Meixner Date: Mon, 5 Dec 2016 10:38:07 +0100 Subject: [PATCH] Skip remount async when systemd is used (issue1097) --- usr/share/rear/restore/default/050_remount_async.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/usr/share/rear/restore/default/050_remount_async.sh b/usr/share/rear/restore/default/050_remount_async.sh index 710de5e57f..93effee563 100644 --- a/usr/share/rear/restore/default/050_remount_async.sh +++ b/usr/share/rear/restore/default/050_remount_async.sh @@ -5,10 +5,19 @@ # via finalize/default/900_remount_sync.sh # see also https://github.com/rear/rear/issues/1097 # +# Remounting with async option is not needed when systemd is used because +# when systemd is used remounting with sync option is skipped in a preceding +# recover WORKFLOW via finalize/default/900_remount_sync.sh and to aviod +# needless operations remounting with async option is also skipped here +# cf. https://github.com/rear/rear/issues/1097 # Skip if not restoreonly WORKFLOW: test "restoreonly" = "$WORKFLOW" || return 0 +# Skip if systemd is used +# systemctl gets copied into the recovery system as /bin/systemctl: +test -x /bin/systemctl && return 0 + while read mountpoint device mountby filesystem junk ; do if ! mount -o remount,async "${device}" $TARGET_FS_ROOT"$mountpoint" ; then LogPrint "Remount async of '${device}' failed which can result very slow restore"