summaryrefslogtreecommitdiff
path: root/net-misc/dropbear/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-misc/dropbear/files
reinit the tree, so we can have metadata
Diffstat (limited to 'net-misc/dropbear/files')
-rw-r--r--net-misc/dropbear/files/dropbear-0.46-dbscp.patch20
-rw-r--r--net-misc/dropbear/files/dropbear.conf.d6
-rw-r--r--net-misc/dropbear/files/dropbear.init.d38
3 files changed, 64 insertions, 0 deletions
diff --git a/net-misc/dropbear/files/dropbear-0.46-dbscp.patch b/net-misc/dropbear/files/dropbear-0.46-dbscp.patch
new file mode 100644
index 000000000000..18873f24c5a6
--- /dev/null
+++ b/net-misc/dropbear/files/dropbear-0.46-dbscp.patch
@@ -0,0 +1,20 @@
+--- dbmulti.c 2005-07-17 07:00:07.000000000 -0400
++++ dbmulti.c 2005-07-17 06:59:35.000000000 -0400
+@@ -60,7 +60,7 @@
+ }
+ #endif
+ #ifdef DBMULTI_scp
+- if (strcmp(progname, "scp") == 0) {
++ if ((strcmp(progname, "scp") == 0) || (strcmp(progname, "dbscp") == 0)) {
+ return scp_main(argc, argv);
+ }
+ #endif
+@@ -81,7 +81,7 @@
+ "'dropbearconvert' - the key converter\n"
+ #endif
+ #ifdef DBMULTI_scp
+- "'scp' - secure copy\n"
++ "'dbscp' - secure copy\n"
+ #endif
+ ,
+ DROPBEAR_VERSION);
diff --git a/net-misc/dropbear/files/dropbear.conf.d b/net-misc/dropbear/files/dropbear.conf.d
new file mode 100644
index 000000000000..555f275d993c
--- /dev/null
+++ b/net-misc/dropbear/files/dropbear.conf.d
@@ -0,0 +1,6 @@
+# /etc/conf.d/dropbear: config file for /etc/init.d/dropbear
+
+# see `dropbear -h` for more information
+# -w disables root logins
+# -p # changes the port number to listen on
+DROPBEAR_OPTS=""
diff --git a/net-misc/dropbear/files/dropbear.init.d b/net-misc/dropbear/files/dropbear.init.d
new file mode 100644
index 000000000000..eaa3ae2919c2
--- /dev/null
+++ b/net-misc/dropbear/files/dropbear.init.d
@@ -0,0 +1,38 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ use logger dns
+ need net
+}
+
+check_config() {
+ mkdir -p /etc/dropbear
+
+ local t k
+ for t in dss rsa ecdsa; do
+ k="/etc/dropbear/dropbear_${t}_host_key"
+ if [ ! -e ${k} ] ; then
+ # See if support is enabled for this key type.
+ if dropbearkey -h 2>&1 | grep -q " ${t}$" ; then
+ einfo "Generating ${k} ..."
+ dropbearkey -t ${t} -f ${k} >/dev/null
+ fi
+ fi &
+ done
+ wait
+}
+
+start() {
+ check_config || return 1
+ ebegin "Starting dropbear"
+ dropbear ${DROPBEAR_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping dropbear"
+ start-stop-daemon --stop --pidfile /var/run/dropbear.pid
+ eend $?
+}