added configs and services and dropbear
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
DROPBEAR_PORT=22
|
||||||
|
DROPBEAR_EXTRA_ARGS="-E -R -B -m"
|
||||||
|
ENABLE_ROOT_LOGIN="yes"
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
interface=eth1
|
||||||
|
dhcp-range=interface:eth1,192.168.200.2,192.168.200.100,12h
|
||||||
|
dhcp-range=interface:wlan0,192.168.201.2,192.168.201.100,12h
|
||||||
|
resolv-file=/etc/dnsmasq.conf.d/resolv.conf
|
||||||
|
addn-hosts=/etc/dnsmasq.conf.d/hosts
|
||||||
|
cache-size=10000
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
192.168.200.1 router.local.com
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
nameserver 8.8.8.8
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
root:x:0:root
|
||||||
|
dnsmasq:x:963:dnsmasq
|
||||||
|
sshd:x:33:sshd
|
||||||
|
nobody:x:65534:
|
||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
::sysinit:/etc/init.d/rcS
|
||||||
|
|
||||||
|
::ctrlaltdel:/sbin/reboot
|
||||||
|
::shutdown:/etc/init.d/rcK
|
||||||
|
|
||||||
|
tty1::respawn:/usr/bin/getty 38400 tty1
|
||||||
|
tty2::respawn:/usr/bin/getty 38400 tty2
|
||||||
|
tty3::respawn:/usr/bin/getty 38400 tty3
|
||||||
|
tty4::respawn:/usr/bin/getty 38400 tty4
|
||||||
|
|
||||||
|
ttyS0::respawn:/usr/bin/getty 115200 ttyS0
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
\h \r (\l)
|
||||||
|
########## ## #### #### ########## ## ##########
|
||||||
|
########## ## #### #### ########## ## ##########
|
||||||
|
## ## ## ## ## ## ## ## ##
|
||||||
|
## ## ## ## ## ## ## ## ## ##
|
||||||
|
########## ## ## ## ## ########## ## ##########
|
||||||
|
########## ## ## ## ## ########## ## ##########
|
||||||
|
## ## ## ## ## ## ##
|
||||||
|
## ## ## ## ## ## ##
|
||||||
|
########## ## ## ## ## ########## ##########
|
||||||
|
########## ## ## ## ## ########## ##########
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
#--- Loopback interface ---
|
||||||
|
auto lo
|
||||||
|
iface lo inet loopback
|
||||||
|
#--------------------------
|
||||||
|
|
||||||
|
#--- eth0 connected to the internet dhcp ---
|
||||||
|
# auto eth0
|
||||||
|
# iface eth0 inet dhcp
|
||||||
|
#-------------------------------------------
|
||||||
|
|
||||||
|
#--- eth0 connected to the internet static ---
|
||||||
|
# auto eth0
|
||||||
|
# iface eth0 inet static
|
||||||
|
# address 192.168.200.1
|
||||||
|
# netmask 255.255.255.0
|
||||||
|
#---------------------------------------------
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
0
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
/
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
0
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
22
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
0
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
23
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
0
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
0
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
root:x:0:0:root:/root:/bin/sh
|
||||||
|
dnsmasq:x:963:963:dnsmasq daemon:/:/usr/bin/nologin
|
||||||
|
sshd:x:33:33:SSH daemon:/var/lib/sshd:/bin/sh
|
||||||
|
nobody:x:65534:65534:Kernel Oerflow User:/:/usr/bin/nologin
|
||||||
+25
@@ -0,0 +1,25 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
#--- import colors ---
|
||||||
|
. /usr/lib/init/colors.sh
|
||||||
|
#---------------------
|
||||||
|
|
||||||
|
export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/.local/bin
|
||||||
|
|
||||||
|
export PS1="$BGREEN** \u@\h: \$(date +%d.%m.%Y) \t\n\w \\\$ $RESET"
|
||||||
|
[ $(id -u) -eq 0 ] && export PS1="$BRED** \u@\h: \$(date +%d.%m.%Y) \t\n\w \\\$ $RESET"
|
||||||
|
|
||||||
|
#--- sys ---
|
||||||
|
alias psa='busybox ps' # show all processes
|
||||||
|
alias c='clear' # clear terminal screen
|
||||||
|
alias e='echo' # print in terminal
|
||||||
|
alias s='source' # source
|
||||||
|
alias una='uname -a' # system name
|
||||||
|
alias ifcnf='ifconfig' # ifconfig
|
||||||
|
alias ipr='ip route' # show routes
|
||||||
|
alias ipa='ip addr' # show addresses
|
||||||
|
alias ipl='ip link' # show links
|
||||||
|
alias ll='ls -lh' # show list files with information
|
||||||
|
alias la='ls -a'
|
||||||
|
alias l='ls -alh'
|
||||||
|
#-----------
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
root:F.fHA5x2Q.xNY:19797::::::
|
||||||
|
dnsmasq:!*:19889::::::
|
||||||
|
sshd:!:19906:0:99999:7:::
|
||||||
|
nobody:!*:19889::::::
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
/usr/bin/sh
|
||||||
|
/usr/bin/ash
|
||||||
+7
-7
@@ -12,7 +12,7 @@
|
|||||||
## ## ##
|
## ## ##
|
||||||
|
|
||||||
#---------------- variables --------------------------
|
#---------------- variables --------------------------
|
||||||
rootdir=$(pwd)
|
rootdir=/
|
||||||
repofile=$rootdir/etc/pm/repo
|
repofile=$rootdir/etc/pm/repo
|
||||||
packagesqueryfile=$rootdir/usr/share/pm/query
|
packagesqueryfile=$rootdir/usr/share/pm/query
|
||||||
reposquerydir=$rootdir/usr/share/pm/repos
|
reposquerydir=$rootdir/usr/share/pm/repos
|
||||||
@@ -245,22 +245,22 @@ clear() {
|
|||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
add)
|
add|a|-a)
|
||||||
add $*
|
add $*
|
||||||
;;
|
;;
|
||||||
down)
|
down|download)
|
||||||
down $2
|
down $2
|
||||||
;;
|
;;
|
||||||
unpack)
|
unpack|u|-u)
|
||||||
unpack $2
|
unpack $2
|
||||||
;;
|
;;
|
||||||
del)
|
del|d|-d)
|
||||||
del $*
|
del $*
|
||||||
;;
|
;;
|
||||||
list)
|
list|l|-l)
|
||||||
list $2
|
list $2
|
||||||
;;
|
;;
|
||||||
query)
|
query|q|-q)
|
||||||
query
|
query
|
||||||
;;
|
;;
|
||||||
help)
|
help)
|
||||||
|
|||||||
+1
-1
@@ -11,7 +11,7 @@
|
|||||||
## ##########
|
## ##########
|
||||||
## ##########
|
## ##########
|
||||||
|
|
||||||
rootdir=$(pwd)
|
rootdir=/
|
||||||
|
|
||||||
#----- colors -------
|
#----- colors -------
|
||||||
. $rootdir/usr/lib/init/colors.sh
|
. $rootdir/usr/lib/init/colors.sh
|
||||||
|
|||||||
@@ -54,15 +54,15 @@ help() {
|
|||||||
#------------ check status function ------------
|
#------------ check status function ------------
|
||||||
check() {
|
check() {
|
||||||
if [ $1 -ne 0 ]; then
|
if [ $1 -ne 0 ]; then
|
||||||
printf "$BBLUE**$BRED ERROR: $2\n$RESET"
|
printf "$BBLUE**$BWHITE $2 [$BRED ERROR $RESET]\n$RESET"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
printf "$BBLUE**$BGREEN SUCCESS: $2\n$RESET"
|
printf "$BBLUE**$BWHITE $2 [$BGREEN SUCCESS $RESET]\n$RESET"
|
||||||
}
|
}
|
||||||
#-----------------------------------------------
|
#-----------------------------------------------
|
||||||
|
|
||||||
#--- notify func ---
|
#--- notify func ---
|
||||||
notify() {
|
notify() {
|
||||||
printf "$BBLUE**$BGREEN $1\n$RESET"
|
printf "$BBLUE**$BWHITE $1\n$RESET"
|
||||||
}
|
}
|
||||||
#-------------------
|
#-------------------
|
||||||
|
|||||||
Executable
+38
@@ -0,0 +1,38 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
#--- import colors and init-funcs ---
|
||||||
|
. /usr/lib/init/colors.sh
|
||||||
|
. /usr/lib/init/init-funcs.sh
|
||||||
|
#------------------------------------
|
||||||
|
|
||||||
|
. /etc/default/dropbear
|
||||||
|
|
||||||
|
ENABLE_ROOT_LOGIN_ARGS=""
|
||||||
|
|
||||||
|
if [ "$ENABLE_ROOT_LOGIN" = "no" ]; then
|
||||||
|
ENABLE_ROOT_LOGIN_ARGS="-w -g"
|
||||||
|
fi
|
||||||
|
|
||||||
|
start() {
|
||||||
|
notify "Starting dropbear"
|
||||||
|
/usr/bin/dropbear -P /var/run/dropbear.pid $DROPBEAR_EXTRA_ARGS $ENABLE_ROOT_LOGIN_ARGS -p $DROPBEAR_PORT &> /var/log/dropbear.log
|
||||||
|
check $? "start dropbear"
|
||||||
|
return $?
|
||||||
|
}
|
||||||
|
|
||||||
|
stop() {
|
||||||
|
notify "Stopping dropbear"
|
||||||
|
kill $(cat /var/run/dropbear.pid)
|
||||||
|
check $? "stop dropbear"
|
||||||
|
return $?
|
||||||
|
}
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start|stop|restart|reload|help)
|
||||||
|
"$1"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
help
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
return $?
|
||||||
Regular → Executable
+2
-1
@@ -13,4 +13,5 @@
|
|||||||
13hostapd
|
13hostapd
|
||||||
14httpd
|
14httpd
|
||||||
15nginx
|
15nginx
|
||||||
16openrouterinit
|
16openrouterinit
|
||||||
|
17dropbear
|
||||||
Reference in New Issue
Block a user