summaryrefslogtreecommitdiff
path: root/packages/openssh/files
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2005-06-30 08:19:37 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2005-06-30 08:19:37 +0000
commitc8e5702127e507e82e6f68a4b8c546803accea9d (patch)
tree00583491f40ecc640f2b28452af995e3a63a09d7 /packages/openssh/files
parent87ec8ca4d2e2eb4d1c1e1e1a6b46a395d56805b9 (diff)
import clean BK tree at cset 1.3670
Diffstat (limited to 'packages/openssh/files')
-rw-r--r--packages/openssh/files/.mtn2git_empty0
-rw-r--r--packages/openssh/files/init88
-rw-r--r--packages/openssh/files/scp-nossl.patch24
3 files changed, 112 insertions, 0 deletions
diff --git a/packages/openssh/files/.mtn2git_empty b/packages/openssh/files/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/openssh/files/.mtn2git_empty
diff --git a/packages/openssh/files/init b/packages/openssh/files/init
index e69de29bb2..b16cbd61a6 100644
--- a/packages/openssh/files/init
+++ b/packages/openssh/files/init
@@ -0,0 +1,88 @@
+#! /bin/sh
+set -e
+
+# /etc/init.d/ssh: start and stop the OpenBSD "secure shell" daemon
+
+test -x /usr/sbin/sshd || exit 0
+( /usr/sbin/sshd -\? 2>&1 | grep -q OpenSSH ) 2>/dev/null || exit 0
+
+if test -f /etc/default/ssh; then
+ . /etc/default/ssh
+fi
+
+check_for_no_start() {
+ # forget it if we're trying to start, and /etc/ssh/sshd_not_to_be_run exists
+ if [ -e /etc/ssh/sshd_not_to_be_run ]; then
+ echo "OpenBSD Secure Shell server not in use (/etc/ssh/sshd_not_to_be_run)"
+ exit 0
+ fi
+}
+
+check_privsep_dir() {
+ # Create the PrivSep empty dir if necessary
+ if [ ! -d /var/run/sshd ]; then
+ mkdir /var/run/sshd
+ chmod 0755 /var/run/sshd
+ fi
+}
+
+check_config() {
+ /usr/sbin/sshd -t || exit 1
+}
+
+check_keys() {
+ # create keys if necessary
+ if [ ! -f /etc/ssh/ssh_host_rsa_key ]; then
+ echo " generating ssh RSA key..."
+ ssh-keygen -q -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa
+ fi
+ if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then
+ echo " generating ssh DSA key..."
+ ssh-keygen -q -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa
+ fi
+}
+
+export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"
+
+case "$1" in
+ start)
+ check_for_no_start
+ echo "Starting OpenBSD Secure Shell server: sshd"
+ check_keys
+ check_privsep_dir
+ start-stop-daemon -S -x /usr/sbin/sshd -- $SSHD_OPTS
+ echo "done."
+ ;;
+ stop)
+ echo -n "Stopping OpenBSD Secure Shell server: sshd"
+ start-stop-daemon -K -x /usr/sbin/sshd
+ echo "."
+ ;;
+
+ reload|force-reload)
+ check_for_no_start
+ check_keys
+ check_config
+ echo -n "Reloading OpenBSD Secure Shell server's configuration"
+ start-stop-daemon -K -s 1 -x /usr/sbin/sshd
+ echo "."
+ ;;
+
+ restart)
+ check_keys
+ check_config
+ echo -n "Restarting OpenBSD Secure Shell server: sshd"
+ start-stop-daemon -K -x /usr/sbin/sshd
+ check_for_no_start
+ check_privsep_dir
+ sleep 2
+ start-stop-daemon -S -x /usr/sbin/sshd -- $SSHD_OPTS
+ echo "."
+ ;;
+
+ *)
+ echo "Usage: /etc/init.d/ssh {start|stop|reload|force-reload|restart}"
+ exit 1
+esac
+
+exit 0
diff --git a/packages/openssh/files/scp-nossl.patch b/packages/openssh/files/scp-nossl.patch
index e69de29bb2..222a52ff8a 100644
--- a/packages/openssh/files/scp-nossl.patch
+++ b/packages/openssh/files/scp-nossl.patch
@@ -0,0 +1,24 @@
+
+#
+# Made by http://www.mn-logistik.de/unsupported/pxa250/patcher
+#
+
+--- openssh-3.6.1p2/Makefile.in~scp-nossl
++++ openssh-3.6.1p2/Makefile.in
+@@ -43,6 +43,7 @@
+ CFLAGS=@CFLAGS@
+ CPPFLAGS=-I. -I$(srcdir) @CPPFLAGS@ $(PATHS) @DEFS@
+ LIBS=@LIBS@
++SCP_LIBS=
+ LIBPAM=@LIBPAM@
+ LIBWRAP=@LIBWRAP@
+ AR=@AR@
+@@ -134,7 +135,7 @@
+ $(LD) -o $@ $(SSHDOBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(LIBWRAP) $(LIBPAM) $(LIBS)
+
+ scp$(EXEEXT): $(LIBCOMPAT) libssh.a scp.o progressmeter.o
+- $(LD) -o $@ scp.o progressmeter.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
++ $(LD) -o $@ scp.o progressmeter.o $(LDFLAGS) -lssh -lopenbsd-compat $(SCP_LIBS)
+
+ ssh-add$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-add.o
+ $(LD) -o $@ ssh-add.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)