소스 검색

qvm-{copy,move}: fix spurious deprecation message

qvm-{copy,move} run qvm-{copy,move}-to-vm with $default as the VM
argument. Don't print the deprecation message in that case.
Rusty Bird 6 년 전
부모
커밋
8d8902f32a
1개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 4 2
      qubes-rpc/qvm-copy-to-vm

+ 4 - 2
qubes-rpc/qvm-copy-to-vm

@@ -42,8 +42,10 @@ if [ $PROGRESS_TYPE = console ] ; then
     export FILECOPY_TOTAL_SIZE
     export FILECOPY_TOTAL_SIZE
 fi
 fi
 
 
-echo "qvm-copy-to-vm/qvm-move-to-vm tools are deprecated," >&2
-echo "use qvm-copy/qvm-move to avoid typing target qube name twice" >&2
+if [ "$VM" != \$default ]; then
+    echo "qvm-copy-to-vm/qvm-move-to-vm tools are deprecated," >&2
+    echo "use qvm-copy/qvm-move to avoid typing target qube name twice" >&2
+fi
 
 
 /usr/lib/qubes/qrexec-client-vm "$VM" qubes.Filecopy /usr/lib/qubes/qfile-agent "$@"
 /usr/lib/qubes/qrexec-client-vm "$VM" qubes.Filecopy /usr/lib/qubes/qfile-agent "$@"