Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: aldot at uclibc.org <aldot@uclibc.org>
To: buildroot@busybox.net
Subject: [Buildroot] svn commit: trunk/buildroot/package/openssh
Date: Mon, 23 Jul 2007 04:01:00 -0700 (PDT)	[thread overview]
Message-ID: <20070723110100.68581A6863@busybox.net> (raw)

Author: aldot
Date: 2007-07-23 04:00:59 -0700 (Mon, 23 Jul 2007)
New Revision: 19215

Log:
- add runlevel script for later use


Added:
   trunk/buildroot/package/openssh/S50sshd


Changeset:
Added: trunk/buildroot/package/openssh/S50sshd
===================================================================
--- trunk/buildroot/package/openssh/S50sshd	                        (rev 0)
+++ trunk/buildroot/package/openssh/S50sshd	2007-07-23 11:00:59 UTC (rev 19215)
@@ -0,0 +1,64 @@
+#!/bin/sh
+#
+# sshd        Starts sshd.
+#
+
+# Make sure the ssh-keygen progam exists
+[ -f /usr/bin/ssh-keygen ] || exit 0
+
+# Check for the SSH1 RSA key
+if [ ! -f /etc/ssh_host_key ] ; then
+	echo Generating RSA Key...
+	/usr/bin/ssh-keygen -t rsa1 -f /etc/ssh_host_key -C '' -N ''
+fi
+
+# Check for the SSH2 RSA key
+if [ ! -f /etc/ssh_host_rsa_key ] ; then
+	echo Generating RSA Key...
+	/usr/bin/ssh-keygen -t rsa -f /etc/ssh_host_rsa_key -C '' -N ''
+fi
+
+# Check for the SSH2 DSA key
+if [ ! -f /etc/ssh_host_dsa_key ] ; then
+	echo Generating DSA Key...
+	echo THIS CAN TAKE A MINUTE OR TWO DEPENDING ON YOUR PROCESSOR!
+	echo
+        /usr/bin/ssh-keygen -t dsa -f /etc/ssh_host_dsa_key -C '' -N ''
+fi
+                
+umask 077
+
+start() {
+ 	echo -n "Starting sshd: "
+	/usr/sbin/sshd
+	touch /var/lock/sshd
+	echo "OK"
+}	
+stop() {
+	echo -n "Stopping sshd: "
+        killall	sshd 
+	rm -f /var/lock/sshd
+	echo "OK" 
+}
+restart() {
+	stop
+	start
+}	
+
+case "$1" in
+  start)
+  	start
+	;;
+  stop)
+  	stop
+	;;
+  restart|reload)
+  	restart
+	;;
+  *)
+	echo $"Usage: $0 {start|stop|restart}"
+	exit 1
+esac
+
+exit $?
+

             reply	other threads:[~2007-07-23 11:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-23 11:01 aldot at uclibc.org [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-07-31 18:33 [Buildroot] svn commit: trunk/buildroot/package/openssh ulf at uclibc.org
2007-08-22 22:36 aldot at uclibc.org
2008-09-24 12:00 egtvedt at uclibc.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070723110100.68581A6863@busybox.net \
    --to=aldot@uclibc.org \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox