소스 검색

Merge remote-tracking branch 'qubesos/pr/27'

* qubesos/pr/27:
  v2: (vm) qvm-move-to-vm: don't "rm -rf" vm name argument
Marek Marczykowski-Górecki 7 년 전
부모
커밋
7c18322ffa
3개의 변경된 파일8개의 추가작업 그리고 26개의 파일을 삭제
  1. 2 1
      Makefile
  2. 6 1
      qubes-rpc/qvm-copy-to-vm
  3. 0 24
      qubes-rpc/qvm-move-to-vm

+ 2 - 1
Makefile

@@ -214,7 +214,8 @@ install-common:
 	install -d $(DESTDIR)/usr/bin
 	install -m 0755 misc/qubes-session-autostart $(DESTDIR)/usr/bin/qubes-session-autostart
 
-	install qubes-rpc/{qvm-open-in-dvm,qvm-open-in-vm,qvm-copy-to-vm,qvm-move-to-vm,qvm-run,qvm-mru-entry} $(DESTDIR)/usr/bin
+	install qubes-rpc/{qvm-open-in-dvm,qvm-open-in-vm,qvm-copy-to-vm,qvm-run,qvm-mru-entry} $(DESTDIR)/usr/bin
+	ln -s qvm-copy-to-vm $(DESTDIR)/usr/bin/qvm-move-to-vm
 	install qubes-rpc/qvm-copy-to-vm.kde $(DESTDIR)$(LIBDIR)/qubes
 	install qubes-rpc/qvm-copy-to-vm.gnome $(DESTDIR)$(LIBDIR)/qubes
 	install qubes-rpc/qvm-move-to-vm.kde $(DESTDIR)$(LIBDIR)/qubes

+ 6 - 1
qubes-rpc/qvm-copy-to-vm

@@ -1,4 +1,5 @@
 #!/bin/sh
+set -e
 #
 # The Qubes OS Project, http://www.qubes-os.org
 #
@@ -25,7 +26,7 @@ if [ $# -lt 2 ] ; then
 	exit 1
 fi
 
-if [ x"$1" = "x--without-progress" ] ; then
+if [ "$1" = "--without-progress" ] ; then
 	export PROGRESS_TYPE=none
 	shift
 else
@@ -41,3 +42,7 @@ if [ $PROGRESS_TYPE = console ] ; then
 fi
 
 /usr/lib/qubes/qrexec-client-vm $VM qubes.Filecopy /usr/lib/qubes/qfile-agent "$@"
+
+if [ "${0##*/}" = "qvm-move-to-vm" ]; then
+	rm -rf -- "$@"
+fi

+ 0 - 24
qubes-rpc/qvm-move-to-vm

@@ -1,24 +0,0 @@
-#!/bin/sh
-#
-# The Qubes OS Project, http://www.qubes-os.org
-#
-# Copyright (C) 2010  Rafal Wojtczuk  <rafal@invisiblethingslab.com>
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-#
-#
-
-. qvm-copy-to-vm "$@" &&
-rm -rf -- "$@"