packages: openssh/opensshd.upstart - init keys in pre-start
glen
glen at pld-linux.org
Sat Oct 8 16:34:43 CEST 2011
Author: glen Date: Sat Oct 8 14:34:43 2011 GMT
Module: packages Tag: HEAD
---- Log message:
- init keys in pre-start
---- Files affected:
packages/openssh:
opensshd.upstart (1.7 -> 1.8)
---- Diffs:
================================================================
Index: packages/openssh/opensshd.upstart
diff -u packages/openssh/opensshd.upstart:1.7 packages/openssh/opensshd.upstart:1.8
--- packages/openssh/opensshd.upstart:1.7 Sat Oct 8 16:34:22 2011
+++ packages/openssh/opensshd.upstart Sat Oct 8 16:34:38 2011
@@ -10,15 +10,20 @@
pre-start script
test -x /usr/sbin/sshd || { stop; exit 0; }
test -c /dev/null || { stop; exit 0; }
+
+ if [ ! -s /etc/ssh/ssh_host_key \
+ -o ! -s /etc/ssh/ssh_host_rsa_key \
+ -o ! -s /etc/ssh/ssh_host_dsa_key \
+ -o ! -s /etc/ssh/ssh_host_ecdsa_key \
+ ]; then
+ # call gen keys if any of the files above is missing or empty
+ /etc/rc.d/init.d/sshd ssh_gen_keys
+ fi
end script
script
. /etc/rc.d/init.d/functions
. /etc/sysconfig/network
-
- if [ ! -s /etc/ssh/ssh_host_key ] ; then
- /etc/rc.d/init.d/sshd init
- fi
if is_yes "$IPV4_NETWORKING" && is_no "$IPV6_NETWORKING"; then
OPTIONS="$OPTIONS -4"
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/openssh/opensshd.upstart?r1=1.7&r2=1.8&f=u
More information about the pld-cvs-commit
mailing list