]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dracut.sh: do not invoke fsfreeze on EFI System Partition 350/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 11 Jan 2018 04:53:27 +0000 (13:53 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 11 Jan 2018 04:55:14 +0000 (13:55 +0900)
When the system boots with EFI, then initrd image is stored
on EFI System Partition. Thus dracut always warn about the
failure to invoke fsfreeze on the partition.
This prevents to run fsfreeze on ESP and suppress the warning.

dracut.sh

index c857b624c488a9b34aab2a003c9815fb813f9b6e..f6a75996ccb2af91c4b4d059482a5a73d7ce7c7e 100755 (executable)
--- a/dracut.sh
+++ b/dracut.sh
@@ -1834,8 +1834,10 @@ command -v restorecon &>/dev/null && restorecon -- "$outfile"
 if ! sync "$outfile" 2> /dev/null; then
     dinfo "dracut: sync operation on newly created initramfs $outfile failed"
     exit 1
+fi
+
 # use fsfreeze only if we're not writing to /
-elif ! [ "$(stat -c %m -- "$outfile")" == "/" ]; then
+if [[ "$(stat -c %m -- "$outfile")" != "/" && "$(stat -f -c %T -- "$outfile")" != "msdos" ]]; 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