]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dracut.sh: quote sync file argument
authorHarald Hoyer <harald@redhat.com>
Wed, 11 Oct 2017 13:28:20 +0000 (15:28 +0200)
committerHarald Hoyer <harald@redhat.com>
Wed, 11 Oct 2017 13:28:20 +0000 (15:28 +0200)
dracut.sh

index 995d983e987d77229b6e8062fa44eb0ab8f69010..990700af05b3cbb87349187bf790290469b52bd1 100755 (executable)
--- a/dracut.sh
+++ b/dracut.sh
@@ -1823,8 +1823,7 @@ fi
 
 command -v restorecon &>/dev/null && restorecon -- "$outfile"
 
-sync $outfile 2> /dev/null
-if [ $? -ne 0 ] ; then
+if ! sync "$outfile" 2> /dev/null; then
     dinfo "dracut: sync operartion on newly created initramfs $outfile failed"
     exit 1
 fi