Browse Source

backup: fix qubes.Restore service - do not send garbage as backup data

Do not send 'which' command output to stdout, as it will mess real
backup data.
This fixes regression introduced by this commit:
commit dad5bfbd18bf233126263bf985777ef6f28cbc1e
Author: HW42 <hw42@ipsumj.de>
Date:   Thu Feb 5 03:14:41 2015 +0100

    remove 'bashisms' or explicit use bash
Marek Marczykowski-Górecki 9 years ago
parent
commit
b560596f1b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      qubes-rpc/qubes.Restore

+ 1 - 1
qubes-rpc/qubes.Restore

@@ -11,7 +11,7 @@ if [ -f "$args" ] ; then
 else
   echo "Checking if arguments is matching a command" >&2
   COMMAND=`echo $args | cut -d ' ' -f 1`
-  if which "$COMMAND"; then
+  if which "$COMMAND" 2>/dev/null; then
     tmpdir=`mktemp -d`
     mkfifo $tmpdir/backup-data
     echo "Redirecting $args to STDOUT" >&2