Changeset b917538 in freewrt for package/openssh/files/sshd.init


Ignore:
Timestamp:
Oct 1, 2006, 10:31:51 AM (19 years ago)
Author:
Waldemar Brodkorb <wbx@…>
Branches:
freewrt_1_0, freewrt_2_0
Children:
edaeca5
Parents:
2f09cbe
Message:
  • sync with changes in trunk
  • lzo2 instead of lzo
  • fix tinc/vtun build
  • security update for openssh/openssl
  • update for iproute2,openvpn,openntpd, iptables and ipp, openswan
  • disable ipv6 in busybox, autoselect this feature for all ipv6 related packages
  • add better startup scripts for openssh and openntpd

git-svn-id: svn://www.freewrt.org/branches/freewrt_1_0@800 afb5a338-a214-0410-bd46-81f09a774fd1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • package/openssh/files/sshd.init

    r2f09cbe rb917538  
    11#!/bin/sh
    22
    3 for type in rsa dsa; do {
    4   # check for keys
    5   key=/etc/ssh/ssh_host_${type}_key
    6   [ ! -f $key ] && {
    7     # generate missing keys
    8     [ -x /usr/bin/ssh-keygen ] && {
    9       /usr/bin/ssh-keygen -N '' -t $type -f $key 2>&- >&- && exec $0 $*
    10     } &
    11     exit 0
    12   }
    13 }; done
    14 mkdir -p /var/empty
    15 /usr/sbin/sshd
     3. /etc/rc.conf
     4
     5case $1 in
     6autostart)
     7        test x"$openssh" = x"NO" && exit 0
     8        exec $0 start
     9        ;;
     10start)
     11        for type in rsa dsa; do {
     12        # check for keys
     13                key=/etc/ssh/ssh_host_${type}_key
     14                [ -f $key ] || {
     15                mkdir -p /etc/ssh
     16                [ -x /usr/bin/ssh-keygen ] && {
     17                        /usr/bin/ssh-keygen -N '' -t $type -f $key 2>&- >&-; \
     18                        rv=$?; \
     19                        fwcf commit 2>&1 | logger -t 'openssh-fwcf'; \
     20                        [ $rv -eq 0 ] && exec $0 $*; } &
     21                exit 0
     22                }
     23        done
     24        mkdir -p /var/empty
     25        /usr/sbin/sshd
     26stop)
     27        killall sshd
     28        ;;
     29restart)
     30        $0 stop
     31        $0 start
     32        ;;
     33*)
     34        echo "Usage: $0 {start | stop | restart}"
     35        exit 1
     36        ;;
     37esac
     38exit $?
Note: See TracChangeset for help on using the changeset viewer.