Browse Source

Merge pull request #331 from fcami/master-fsfreeze

call fsfreeze(8) on /boot to flush initramfs data & metadata to media
master
Harald Hoyer 7 years ago committed by GitHub
parent
commit
29a9e92999
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      dracut.sh

7
dracut.sh

@ -1828,8 +1828,13 @@ fi @@ -1828,8 +1828,13 @@ fi
command -v restorecon &>/dev/null && restorecon -- "$outfile"

if ! sync "$outfile" 2> /dev/null; then
dinfo "dracut: sync operartion on newly created initramfs $outfile failed"
dinfo "dracut: sync operation on newly created initramfs $outfile failed"
exit 1
# use fsfreeze only if we're not writing to /
elif ! [ "$(stat -c %m -- "$outfile")" == "/" ]; then
if ! $(fsfreeze -f $(dirname "$outfile") 2>/dev/null && fsfreeze -u $(dirname "$outfile") 2>/dev/null); then
dinfo "dracut: warning: could not fsfreeze $(dirname "$outfile")"
fi
fi

exit 0

Loading…
Cancel
Save