check for key file existence after creating keys, not before
authorPhil Blundell <philb@gnu.org>
Sat, 18 Sep 2004 14:02:55 +0000 (14:02 +0000)
committerPhil Blundell <philb@gnu.org>
Sat, 18 Sep 2004 14:02:55 +0000 (14:02 +0000)
BKrev: 414c400fOKMO4yAyVVwiGNTrBIv4gg

dropbear/dropbear/init
dropbear/dropbear_0.43+0.44test4.oe

index 2f53d96..21e2ffa 100644 (file)
@@ -46,10 +46,6 @@ test -n "$DROPBEAR_DSSKEY" || \
 test -n "$DROPBEAR_KEYTYPES" || \
   DROPBEAR_KEYTYPES="rsa"
 
-KEY_ARGS=""
-test -f $DROPBEAR_DSSKEY && KEY_ARGS="$KEY_ARGS -d \"$DROPBEAR_DSSKEY\""
-test -f $DROPBEAR_RSAKEY && KEY_ARGS="$KEY_ARGS -r \"$DROPBEAR_RSAKEY\""
-
 gen_keys() {
 for t in $DROPBEAR_KEYTYPES; do
   case $t in
@@ -67,6 +63,9 @@ case "$1" in
   start)
        echo -n "Starting $DESC: "
        gen_keys
+       KEY_ARGS=""
+       test -f $DROPBEAR_DSSKEY && KEY_ARGS="$KEY_ARGS -d \"$DROPBEAR_DSSKEY\""
+       test -f $DROPBEAR_RSAKEY && KEY_ARGS="$KEY_ARGS -r \"$DROPBEAR_RSAKEY\""
        start-stop-daemon -S \
          -x "$DAEMON" -- $KEY_ARGS \
            -p "$DROPBEAR_PORT" $DROPBEAR_EXTRA_ARGS
@@ -81,6 +80,9 @@ case "$1" in
        echo -n "Restarting $DESC: "
        start-stop-daemon -K -x "$DAEMON"
        sleep 1
+       KEY_ARGS=""
+       test -f $DROPBEAR_DSSKEY && KEY_ARGS="$KEY_ARGS -d \"$DROPBEAR_DSSKEY\""
+       test -f $DROPBEAR_RSAKEY && KEY_ARGS="$KEY_ARGS -r \"$DROPBEAR_RSAKEY\""
        start-stop-daemon -S \
          -x "$DAEMON" -- $KEY_ARGS \
            -p "$DROPBEAR_PORT" $DROPBEAR_EXTRA_ARGS
index 558f137..b494ce7 100644 (file)
@@ -1,7 +1,7 @@
 DESCRIPTION = "Dropbear SSH Implementation"
 LICENSE = "MIT"
 DEPENDS = "zlib"
-PR = "r1"
+PR = "r2"
 RV = "0.44test4"
 
 SRC_URI = "http://matt.ucc.asn.au/dropbear/testing/dropbear-${RV}.tar.bz2 \