source: freewrt/package/dropbear/files/dropbear.init@ 141418f

freewrt_1_0 freewrt_2_0
Last change on this file since 141418f was 141418f, checked in by Waldemar Brodkorb <wbx@…>, 19 years ago
  • remove some obsolete firewall config stuff
  • add old-style network configuration based on nvram
  • add new rc.conf file to configure which services should be started on startup, bsd-ish behavior
  • disable firewall by default in rc.conf, remote update via ssh is now possible. port 22 is open by default on wan side
  • enable suid bit on busybox and add a "admin" user
  • ssh via root is disabled (dropbear -w)
  • default password for "admin" is "FreeWRT", as well as for root please change directly after installation
  • remove telnetd from startup, will be used only for failsafe

git-svn-id: svn://www.freewrt.org/trunk/freewrt@181 afb5a338-a214-0410-bd46-81f09a774fd1

  • Property mode set to 100755
File size: 548 bytes
Line 
1#!/bin/sh
2
3. /etc/rc.conf
4
5if [ X"${ssh}" == X"NO" ]; then
6 exit 0
7fi
8
9for type in rsa dss; do {
10 # check for keys
11 key=/etc/dropbear/dropbear_${type}_host_key
12 [ ! -f $key ] && {
13 # generate missing keys
14 mkdir -p /etc/dropbear
15 [ -x /usr/bin/dropbearkey ] && {
16 /usr/bin/dropbearkey -t $type -f $key 2>&- >&- && exec $0 $*
17 } &
18 exit 0
19 }
20}; done
21
22case $1 in
23start)
24 /usr/sbin/dropbear -w
25 ;;
26stop)
27 killall dropbear
28 ;;
29restart)
30 $0 stop
31 $0 start
32 ;;
33*)
34 echo "Usage: $0 {start | stop | restart}"
35 ;;
36esac
37exit 0
Note: See TracBrowser for help on using the repository browser.