]> gitweb.fluxo.info Git - kvmx.git/commitdiff
Fix: syntax check at rsync_to and rsync_from
authorSilvio Rhatto <rhatto@riseup.net>
Mon, 19 Oct 2020 17:45:37 +0000 (14:45 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Mon, 19 Oct 2020 17:45:37 +0000 (14:45 -0300)
kvmx

diff --git a/kvmx b/kvmx
index 3759502efa42cbbc54100882284f095cc12adfc0..b4e7d18db9e6f07bc5f6a4d092111151b7b5f13d 100755 (executable)
--- a/kvmx
+++ b/kvmx
@@ -1208,6 +1208,11 @@ function kvmx_rsync_to {
   ORIG="$1"
   DEST="$2"
 
+  if [ -z "$ORIG" ]; then
+    echo "usage $BASENAME rsync_to $GUEST <orig> [dest]"
+    exit 1
+  fi
+
   if [ -z "$DEST" ]; then
     # Error
     #exit 1
@@ -1240,6 +1245,11 @@ function kvmx_rsync_from {
   ORIG="$1"
   DEST="$2"
 
+  if [ -z "$ORIG" ]; then
+    echo "usage $BASENAME rsync_from $GUEST <orig> [dest]"
+    exit 1
+  fi
+
   if [ -z "$DEST" ]; then
     # Error
     #exit 1