Changeset 30fbba8 in clfs-embedded for bootscripts/clfs
- Timestamp:
- Jan 23, 2007, 10:39:16 AM (18 years ago)
- Branches:
- master
- Children:
- f2aa902
- Parents:
- 36929b7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
bootscripts/clfs/rc.d/init.d/sshd
r36929b7 r30fbba8 5 5 . /etc/rc.d/init.d/functions 6 6 7 DSSKEY=/etc/ssh/dss_host_key 8 RSAKEY=/etc/ssh/rsa_host_key 7 DSSKEY=/etc/dropbear/dropbear_dss_host_key 8 RSAKEY=/etc/dropbear/dropbear_rsa_host_key 9 PIDFILE=/var/run/dropbear.pid 9 10 10 11 case "$1" in … … 12 13 if [ ! -r "$DSSKEY" ]; then 13 14 echo -n "Generating DSS host key: " 14 dropbearkey -t dss -f "$DSSKEY" &> /dev/null15 dropbearkey -t dss -f "$DSSKEY" >/dev/null 2>&1 15 16 check_status 16 17 fi 17 18 if [ ! -r "$RSAKEY" ]; then 18 19 echo -n "Generating RSA host key: " 19 dropbearkey -t rsa -f "$RSAKEY" &> /dev/null20 dropbearkey -t rsa -f "$RSAKEY" >/dev/null 2>&1 20 21 check_status 21 22 fi 22 if [ -r /var/run/dropbear.pid]; then23 echo "Service sshdalready running."23 if [ -r "$PIDFILE" ]; then 24 echo "Service dropbear already running." 24 25 else 25 26 echo -n "Starting SSH server: " … … 29 30 ;; 30 31 stop) 31 if [ -r /var/run/dropbear.pid]; then32 echo -n "Stopping SSH server: "33 kill `cat /var/run/dropbear.pid`32 if [ -r "$PIDFILE" ]; then 33 echo -n "Stopping dropbear SSH server: " 34 kill `cat "$PIDFILE"` 34 35 check_status 35 36 else 36 echo "Service sshdnot running."37 echo "Service dropbear not running." 37 38 fi 38 39 ;; … … 42 43 ;; 43 44 status) 44 if [ -r /var/run/dropbear.pid]; then45 echo "Service sshd running (PID `cat /var/run/dropbear.pid`)."45 if [ -r "$PIDFILE" ]; then 46 echo "Service dropbear running (PID $(cat "$PIDFILE"))." 46 47 else 47 echo "Service sshdnot running."48 echo "Service dropbear not running." 48 49 fi 49 50 ;;
Note:
See TracChangeset
for help on using the changeset viewer.