diff --git a/qubes-rpc/qubes.Backup b/qubes-rpc/qubes.Backup index d3ef001..b07478c 100644 --- a/qubes-rpc/qubes.Backup +++ b/qubes-rpc/qubes.Backup @@ -9,7 +9,7 @@ if [ -d "$args" ] ; then else echo "Checking if arguments is matching a command" COMMAND=`echo $args | cut -d ' ' -f 1` - if which "$COMMAND"; then + if type "$COMMAND"; then echo "Redirecting STDIN to $args" # Parsing args to handle quotes correctly # Dangerous method if args are uncontrolled diff --git a/qubes-rpc/qubes.Restore b/qubes-rpc/qubes.Restore index 5db4fa8..2e0a057 100644 --- a/qubes-rpc/qubes.Restore +++ b/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" >/dev/null; then + if type "$COMMAND" >/dev/null; then tmpdir=`mktemp -d` mkfifo $tmpdir/backup-data echo "Redirecting $args to STDOUT" >&2