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