diff --git a/src/etc/rc b/src/etc/rc index a085b823..91ab7c81 100644 --- a/src/etc/rc +++ b/src/etc/rc @@ -1,4 +1,4 @@ -# $OpenBSD: rc,v 1.337 2010/04/25 10:10:51 michele Exp $ +# $OpenBSD: rc,v 1.338 2010/06/28 20:16:21 reyk Exp $ # System startup script run by init on autoboot # or after single-user. @@ -372,7 +372,7 @@ if [ X"${named_flags}" != X"NO" ]; then fi if [ ! -f /etc/isakmpd/private/local.key ]; then - echo -n "openssl: generating new isakmpd RSA key... " + echo -n "openssl: generating new isakmpd/iked RSA key... " if /usr/sbin/openssl genrsa -out /etc/isakmpd/private/local.key 2048 \ > /dev/null 2>&1; then chmod 600 /etc/isakmpd/private/local.key @@ -384,6 +384,13 @@ if [ ! -f /etc/isakmpd/private/local.key ]; then fi fi +if [ ! -f /etc/iked/private/local.key ]; then + # Just copy the generated isakmpd key + cp /etc/isakmpd/private/local.key /etc/iked/private/local.key + chmod 600 /etc/iked/private/local.key + cp /etc/isakmpd/local.pub /etc/iked/local.pub +fi + if [ X"${isakmpd_flags}" != X"NO" ]; then if [ X"${sasyncd_flags}" != X"NO" ]; then isakmpd_flags="-S ${isakmpd_flags}" @@ -391,6 +398,13 @@ if [ X"${isakmpd_flags}" != X"NO" ]; then echo 'starting isakmpd'; isakmpd ${isakmpd_flags} fi +if [ X"${iked_flags}" != X"NO" ]; then + if [ X"${sasyncd_flags}" != X"NO" ]; then + iked_flags="-S ${iked_flags}" + fi + echo 'starting iked'; iked ${iked_flags} +fi + if [ X"${sasyncd_flags}" != X"NO" ]; then echo 'starting sasyncd'; sasyncd ${sasyncd_flags} fi diff --git a/src/etc/rc.conf b/src/etc/rc.conf index a29b8fb4..cae37d85 100644 --- a/src/etc/rc.conf +++ b/src/etc/rc.conf @@ -1,6 +1,6 @@ #!/bin/sh - # -# $OpenBSD: rc.conf,v 1.136 2010/04/25 10:10:51 michele Exp $ +# $OpenBSD: rc.conf,v 1.137 2010/06/28 20:16:21 reyk Exp $ # set these to "NO" to turn them off. otherwise, they're used as flags ldpd_flags=NO # for normal use: "" @@ -21,6 +21,7 @@ timed_flags=NO # for normal use: "" ldattach_flags=NO # for normal use: "[options] linedisc cua-device" ntpd_flags=NO # for normal use: "" isakmpd_flags=NO # for normal use: "" +iked_flags=NO # for normal use: "" sasyncd_flags=NO # for normal use: "" mopd_flags=NO # for normal use: "-a" apmd_flags=NO # for normal use: ""