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