Blame 0069-95ssh-client-module-setup.sh-do-not-install-ssh-clie.patch

Harald Hoyer 8e216f
From 38164332e198f7cc8f339b42d555796918de04b3 Mon Sep 17 00:00:00 2001
Harald Hoyer 8e216f
From: Harald Hoyer <harald@redhat.com>
Harald Hoyer 8e216f
Date: Wed, 25 Jan 2012 10:02:29 +0100
Harald Hoyer 8e216f
Subject: [PATCH] 95ssh-client/module-setup.sh: do not install ssh-client by
Harald Hoyer 8e216f
 default
Harald Hoyer 8e216f
Harald Hoyer 8e216f
Do not install ssh-client by default and report the missing ctty in the
Harald Hoyer 8e216f
install section.
Harald Hoyer 8e216f
---
Harald Hoyer 8e216f
 modules.d/95ssh-client/module-setup.sh |   15 ++++++++-------
Harald Hoyer 8e216f
 1 files changed, 8 insertions(+), 7 deletions(-)
Harald Hoyer 8e216f
Harald Hoyer 8e216f
diff --git a/modules.d/95ssh-client/module-setup.sh b/modules.d/95ssh-client/module-setup.sh
Harald Hoyer 8e216f
index 3aa9bd2..4410e4e 100644
Harald Hoyer 8e216f
--- a/modules.d/95ssh-client/module-setup.sh
Harald Hoyer 8e216f
+++ b/modules.d/95ssh-client/module-setup.sh
Harald Hoyer 8e216f
@@ -9,22 +9,18 @@ check() {
Harald Hoyer 8e216f
     type -P ssh >/dev/null || return 1
Harald Hoyer 8e216f
     type -P scp >/dev/null || return 1
Harald Hoyer 8e216f
     [[ $mount_needs ]] && return 1
Harald Hoyer 8e216f
+
Harald Hoyer 8e216f
     if [[ $sshkey ]]; then
Harald Hoyer 8e216f
         [ ! -f $sshkey ] && {
Harald Hoyer 8e216f
-            derror "sshkey is not found!"
Harald Hoyer 8e216f
+            derror "ssh key: $sshkey is not found!"
Harald Hoyer 8e216f
             return 1
Harald Hoyer 8e216f
         }
Harald Hoyer 8e216f
         [[ ! $cttyhack = yes ]] && {
Harald Hoyer 8e216f
             dinfo "--ctty is not used, you should make sure the machine is a knownhost and copy the sshkey to remote machine!"
Harald Hoyer 8e216f
         }
Harald Hoyer 8e216f
-    else
Harald Hoyer 8e216f
-        [[ ! $cttyhack = yes ]] && {
Harald Hoyer 8e216f
-            derror "ssh interactive mode needs option --ctty!"
Harald Hoyer 8e216f
-            return 1
Harald Hoyer 8e216f
-        }
Harald Hoyer 8e216f
     fi
Harald Hoyer 8e216f
 
Harald Hoyer 8e216f
-    return 0
Harald Hoyer 8e216f
+    return 255
Harald Hoyer 8e216f
 }
Harald Hoyer 8e216f
 
Harald Hoyer 8e216f
 depends() {
Harald Hoyer 8e216f
@@ -54,6 +50,11 @@ inst_sshenv()
Harald Hoyer 8e216f
 }
Harald Hoyer 8e216f
 
Harald Hoyer 8e216f
 install() {
Harald Hoyer 8e216f
+    [[ ! $cttyhack = yes ]] && {
Harald Hoyer 8e216f
+        derror "ssh interactive mode needs option --ctty!"
Harald Hoyer 8e216f
+        return 1
Harald Hoyer 8e216f
+    }
Harald Hoyer 8e216f
+
Harald Hoyer 8e216f
     inst ssh
Harald Hoyer 8e216f
     inst scp
Harald Hoyer 8e216f
     inst_sshenv