From df134da8ba7c57c2a8a68da9749d94de3422f343 Mon Sep 17 00:00:00 2001 From: Alejandro Mery Date: Mon, 11 Oct 2010 00:48:35 +0200 Subject: [PATCH] dropbear: added sample config file for dropbear --- pkgs/dropbear/etc_conf_dropbear.sample.txt | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 pkgs/dropbear/etc_conf_dropbear.sample.txt diff --git a/pkgs/dropbear/etc_conf_dropbear.sample.txt b/pkgs/dropbear/etc_conf_dropbear.sample.txt new file mode 100644 index 0000000..d34a22c --- /dev/null +++ b/pkgs/dropbear/etc_conf_dropbear.sample.txt @@ -0,0 +1,29 @@ +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: target/sheba/pkgs/dropbear/etc_conf_dropbear.sample.txt +# Copyright (C) 2010 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. A copy of the +# GNU General Public License can be found in the file COPYING. +# --- SDE-COPYRIGHT-NOTE-END --- + +addresses() { + ip -o addr 2> /dev/null | + grep -v -e '^.: lo ' -e ' secondary ' | + sed -ne 's,.* inet \([^ /]\+\)/.*,\1,p' +} + +DROPBEAR_LISTEN= +for x in $(addresses); do + case "$x" in + 10.*) DROPBEAR_LISTEN="$DROPBEAR_LISTEN $x:22" ;; + *) DROPBEAR_LISTEN="$DROPBEAR_LISTEN $x:2200" ;; + esac +done + +DROPBEAR_PASSWD=no