Changeset 30fbba8 in clfs-embedded for bootscripts/clfs/rc.d/init.d


Ignore:
Timestamp:
Jan 23, 2007, 6:39:16 PM (18 years ago)
Author:
Maarten Lankhorst <m.b.lankhorst@…>
Branches:
master
Children:
f2aa902
Parents:
36929b7
Message:

Fix dropbear

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bootscripts/clfs/rc.d/init.d/sshd

    r36929b7 r30fbba8  
    55. /etc/rc.d/init.d/functions
    66
    7 DSSKEY=/etc/ssh/dss_host_key
    8 RSAKEY=/etc/ssh/rsa_host_key
     7DSSKEY=/etc/dropbear/dropbear_dss_host_key
     8RSAKEY=/etc/dropbear/dropbear_rsa_host_key
     9PIDFILE=/var/run/dropbear.pid
    910
    1011case "$1" in
     
    1213        if [ ! -r "$DSSKEY" ]; then
    1314                echo -n "Generating DSS host key: "
    14                 dropbearkey -t dss -f "$DSSKEY" &> /dev/null
     15                dropbearkey -t dss -f "$DSSKEY" >/dev/null 2>&1
    1516                check_status
    1617        fi
    1718        if [ ! -r "$RSAKEY" ]; then
    1819                echo -n "Generating RSA host key: "
    19                 dropbearkey -t rsa -f "$RSAKEY" &> /dev/null
     20                dropbearkey -t rsa -f "$RSAKEY" >/dev/null 2>&1
    2021                check_status
    2122        fi
    22         if [ -r /var/run/dropbear.pid ]; then
    23                 echo "Service sshd already running."
     23        if [ -r "$PIDFILE" ]; then
     24                echo "Service dropbear already running."
    2425        else
    2526                echo -n "Starting SSH server: "
     
    2930        ;;
    3031stop)
    31         if [ -r /var/run/dropbear.pid ]; then
    32                 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"`
    3435                check_status
    3536        else
    36                 echo "Service sshd not running."
     37                echo "Service dropbear not running."
    3738        fi
    3839        ;;
     
    4243        ;;
    4344status)
    44         if [ -r /var/run/dropbear.pid ]; then
    45                 echo "Service sshd running (PID `cat /var/run/dropbear.pid`)."
     45        if [ -r "$PIDFILE" ]; then
     46                echo "Service dropbear running (PID $(cat "$PIDFILE"))."
    4647        else
    47                 echo "Service sshd not running."
     48                echo "Service dropbear not running."
    4849        fi
    4950        ;;
Note: See TracChangeset for help on using the changeset viewer.