freewrt_1_0
freewrt_2_0
|
Last change
on this file since b917538 was b917538, checked in by Waldemar Brodkorb <wbx@…>, 19 years ago |
- 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
|
-
Property mode
set to
100755
|
|
File size:
684 bytes
|
| Line | |
|---|
| 1 | #!/bin/sh
|
|---|
| 2 |
|
|---|
| 3 | . /etc/rc.conf
|
|---|
| 4 |
|
|---|
| 5 | case $1 in
|
|---|
| 6 | autostart)
|
|---|
| 7 | test x"$ssh" = x"NO" && exit 0
|
|---|
| 8 | [ -x /usr/sbin/sshd ] -o [ x"$openssh" = x"YES" ] && exit 0
|
|---|
| 9 | exec $0 start
|
|---|
| 10 | ;;
|
|---|
| 11 | start)
|
|---|
| 12 | # check for keys
|
|---|
| 13 | for type in rsa dss; do
|
|---|
| 14 | key=/etc/dropbear/dropbear_${type}_host_key
|
|---|
| 15 | [ -f $key ] || {
|
|---|
| 16 | mkdir -p /etc/dropbear
|
|---|
| 17 | [ -x /usr/bin/dropbearkey ] && {
|
|---|
| 18 | /usr/bin/dropbearkey -t $type -f $key 2>&- >&-; \
|
|---|
| 19 | rv=$?; \
|
|---|
| 20 | fwcf commit 2>&1 | logger -t 'dropbear-fwcf'; \
|
|---|
| 21 | [ $rv -eq 0 ] && exec $0 $*; } &
|
|---|
| 22 | exit 0
|
|---|
| 23 | }
|
|---|
| 24 | done
|
|---|
| 25 | /usr/sbin/dropbear -g
|
|---|
| 26 | ;;
|
|---|
| 27 | stop)
|
|---|
| 28 | killall dropbear
|
|---|
| 29 | ;;
|
|---|
| 30 | restart)
|
|---|
| 31 | $0 stop
|
|---|
| 32 | $0 start
|
|---|
| 33 | ;;
|
|---|
| 34 | *)
|
|---|
| 35 | echo "Usage: $0 {start | stop | restart}"
|
|---|
| 36 | exit 1
|
|---|
| 37 | ;;
|
|---|
| 38 | esac
|
|---|
| 39 | exit $?
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.