1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
From 887b49452acfa897e700083fe732f1b24788f1d8 Mon Sep 17 00:00:00 2001
From: Mark Blakeney <mark.blakeney@bullet-systems.net>
Date: Tue, 21 May 2019 09:24:56 +1000
Subject: [PATCH] Relative paths should be allowed
This applies the fix for https://code.google.com/archive/p/parallel-ssh/issues/83.
---
bin/prsync | 4 ----
bin/pscp | 6 +-----
bin/pslurp | 5 +----
3 files changed, 2 insertions(+), 13 deletions(-)
diff --git a/bin/prsync b/bin/prsync
index 84130af..354e225 100755
--- a/bin/prsync
+++ b/bin/prsync
@@ -7,7 +7,6 @@
"""Parallel rsync to the set of nodes in hosts.txt.
For each node, we essentially do a rsync -rv -e ssh local user@host:remote.
-Note that remote must be an absolute path.
"""
import os
@@ -110,9 +109,6 @@ if __name__ == "__main__":
opts, args = parse_args()
local = args[0]
remote = args[1]
- if not re.match("^/", remote):
- print("Remote path %s must be an absolute path" % remote)
- sys.exit(3)
try:
hosts = psshutil.read_host_files(opts.host_files,
default_user=opts.user)
diff --git a/bin/pscp b/bin/pscp
index 5b89b70..75bf449 100755
--- a/bin/pscp
+++ b/bin/pscp
@@ -7,8 +7,7 @@
"""Parallel scp to the set of nodes in hosts.txt.
For each node, we essentially do a scp [-r] local user@host:remote. This
-program also uses the -q (quiet) and -C (compression) options. Note that
-remote must be an absolute path.
+program also uses the -q (quiet) and -C (compression) options.
"""
import os
@@ -92,9 +91,6 @@ if __name__ == "__main__":
opts, args = parse_args()
localargs = args[0:-1]
remote = args[-1]
- if not re.match("^/", remote):
- print("Remote path %s must be an absolute path" % remote)
- sys.exit(3)
try:
hosts = psshutil.read_host_files(opts.host_files,
default_user=opts.user)
diff --git a/bin/pslurp b/bin/pslurp
index c7dece6..8a73124 100755
--- a/bin/pslurp
+++ b/bin/pslurp
@@ -8,7 +8,7 @@
For each node, we essentially do a scp [-r] user@host:remote
outdir/<node>/local. This program also uses the -q (quiet) and -C
-(compression) options. Note that remote must be an absolute path.
+(compression) options.
"""
import os
@@ -113,9 +113,6 @@ if __name__ == "__main__":
opts, args = parse_args()
remote = args[0]
local = args[1]
- if not re.match("^/", remote):
- print("Remote path %s must be an absolute path" % remote)
- sys.exit(3)
try:
hosts = psshutil.read_host_files(opts.host_files,
default_user=opts.user)
--
2.21.0
|