]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
95ssh-client/module-setup.sh: do not install ssh-client by default
authorHarald Hoyer <harald@redhat.com>
Wed, 25 Jan 2012 09:02:29 +0000 (10:02 +0100)
committerHarald Hoyer <harald@redhat.com>
Wed, 25 Jan 2012 09:02:29 +0000 (10:02 +0100)
Do not install ssh-client by default and report the missing ctty in the
install section.

modules.d/95ssh-client/module-setup.sh

index 3aa9bd226bef38b26efe36ae77fcc569c17f89d1..4410e4e78f4627aabc345ed32262c3d4207d99cd 100644 (file)
@@ -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