Harald Hoyer b3dfe7
From faabcb23602673f87ec60965b3ff615004371603 Mon Sep 17 00:00:00 2001
Harald Hoyer b3dfe7
From: Harald Hoyer <harald@redhat.com>
Harald Hoyer b3dfe7
Date: Wed, 11 Oct 2017 15:28:20 +0200
Harald Hoyer b3dfe7
Subject: [PATCH] dracut.sh: quote sync file argument
Harald Hoyer b3dfe7
Harald Hoyer b3dfe7
---
Harald Hoyer b3dfe7
 dracut.sh | 3 +--
Harald Hoyer b3dfe7
 1 file changed, 1 insertion(+), 2 deletions(-)
Harald Hoyer b3dfe7
Harald Hoyer b3dfe7
diff --git a/dracut.sh b/dracut.sh
Harald Hoyer b3dfe7
index 995d983e..990700af 100755
Harald Hoyer b3dfe7
--- a/dracut.sh
Harald Hoyer b3dfe7
+++ b/dracut.sh
Harald Hoyer b3dfe7
@@ -1823,8 +1823,7 @@ fi
Harald Hoyer b3dfe7
 
Harald Hoyer b3dfe7
 command -v restorecon &>/dev/null && restorecon -- "$outfile"
Harald Hoyer b3dfe7
 
Harald Hoyer b3dfe7
-sync $outfile 2> /dev/null
Harald Hoyer b3dfe7
-if [ $? -ne 0 ] ; then
Harald Hoyer b3dfe7
+if ! sync "$outfile" 2> /dev/null; then
Harald Hoyer b3dfe7
     dinfo "dracut: sync operartion on newly created initramfs $outfile failed"
Harald Hoyer b3dfe7
     exit 1
Harald Hoyer b3dfe7
 fi
Harald Hoyer b3dfe7