Skip to content

Commit

Permalink
Merge pull request #1100 from jsmeix/Skip_remount_async_when_systemd_…
Browse files Browse the repository at this point in the history
…is_used_issue1097

Skip remount async when systemd is used.
Remounting with async option is not needed
when systemd is used because when systemd
is used remounting with sync option is skipped and
to aviod needless operations remounting with async
option is also skipped, see
#1097
and
#1099
  • Loading branch information
jsmeix committed Dec 5, 2016
2 parents af21361 + 15b423e commit c09f2bd
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions usr/share/rear/restore/default/050_remount_async.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit c09f2bd

Please sign in to comment.