This is an automated email from the ASF dual-hosted git repository.

lfrolov pushed a commit to branch DATALAB-2567
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git


The following commit(s) were added to refs/heads/DATALAB-2567 by this push:
     new d598753  [DATALAB-2567]: changed mv scp to rm scp
d598753 is described below

commit d5987530f6d1023de365ad09be1804a982fdc1c0
Author: leonidfrolov <[email protected]>
AuthorDate: Wed Dec 8 11:21:48 2021 +0200

    [DATALAB-2567]: changed mv scp to rm scp
---
 .../src/base/scripts/install_prerequisites.py                     | 2 +-
 .../src/general/lib/os/debian/common_lib.py                       | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git 
a/infrastructure-provisioning/src/base/scripts/install_prerequisites.py 
b/infrastructure-provisioning/src/base/scripts/install_prerequisites.py
index 007f0e1..95cf0dc 100644
--- a/infrastructure-provisioning/src/base/scripts/install_prerequisites.py
+++ b/infrastructure-provisioning/src/base/scripts/install_prerequisites.py
@@ -61,7 +61,7 @@ if __name__ == "__main__":
         sys.exit(1)
 
     logging.info("Disable scp on nodes")
-    disable_edge_scp_binary(args.user)
+    remove_scp_binary(args.user)
 
     #logging.info("Updating openssh to version")
     #ensure_openssh_version(args.user)
diff --git 
a/infrastructure-provisioning/src/general/lib/os/debian/common_lib.py 
b/infrastructure-provisioning/src/general/lib/os/debian/common_lib.py
index dc4920c..648701f 100644
--- a/infrastructure-provisioning/src/general/lib/os/debian/common_lib.py
+++ b/infrastructure-provisioning/src/general/lib/os/debian/common_lib.py
@@ -285,11 +285,11 @@ def find_java_path_local():
         sys.exit(1)
 
 
-def disable_edge_scp_binary(os_user):
+def remove_scp_binary(os_user):
     try:
-        if not exists(datalab.fab.conn, 
'/home/{}/.ensure_dir/disabled_scp_binary'.format(os_user)):
-            datalab.fab.conn.sudo('mv /usr/bin/scp /usr/bin/scp_disabled')
-        datalab.fab.conn.sudo('touch 
/home/{}/.ensure_dir/disabled_scp_binary'.format(os_user))
+        if not exists(datalab.fab.conn, 
'/home/{}/.ensure_dir/remove_scp_binary'.format(os_user)):
+            datalab.fab.conn.sudo('rm /usr/bin/scp')
+        datalab.fab.conn.sudo('touch 
/home/{}/.ensure_dir/remove_scp_binary'.format(os_user))
     except Exception as err:
         logging.error('Updating openssh to version:', str(err))
         traceback.print_exc()

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to