Skip to content
This repository has been archived by the owner on May 9, 2018. It is now read-only.

Commit

Permalink
Add Makefile and hmod base files
Browse files Browse the repository at this point in the history
  • Loading branch information
DanTheMan827 committed Dec 19, 2017
1 parent 076e0ff commit d07728d
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
src/
mod/bin/dropbear
*.hmod

22 changes: 22 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
all: dropbear.hmod
dropbear.hmod: mod/bin/dropbear
chmod +x mod/bin/dropbear
tar -czvf dropbear.hmod -C mod bin etc
mod/bin/dropbear: src/dropbear-2015.68/dropbear
-mkdir -p mod/bin
[ -f mod/bin/dropbear ] || upx --ultra-brute src/dropbear-2015.68/dropbear -o mod/bin/dropbear
src/dropbear-2015.68.tar.bz2:
mkdir src
wget https://github.com/DanTheMan827/dropbear.hmod/releases/download/tarballs/dropbear-2015.68.tar.bz2 -O src/dropbear-2015.68.tar.bz2
src/dropbear-2015.68/configure: src/dropbear-2015.68.tar.bz2
[ -f src/dropbear-2015.68/configure ] || tar -xjvf src/dropbear-2015.68.tar.bz2 -C src/
src/dropbear-2015.68/Makefile: src/dropbear-2015.68/configure
cd src/dropbear-2015.68; \
./configure --host=arm-linux-gnueabihf --prefix=/ --disable-zlib CC=arm-linux-gnueabihf-gcc LD=arm-linux-gnueabihf-ld
src/dropbear-2015.68/dropbear: src/dropbear-2015.68/Makefile
make -C src/dropbear-2015.68
clean:
-rm dropbear.hmod
-rm mod/bin/dropbear
-rm -rf src
.PHONY: all clean
9 changes: 9 additions & 0 deletions mod/etc/avahi/services/ssh.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_ssh._tcp</type>
<port>22</port>
</service>
</service-group>
Binary file added mod/etc/dropbear/dropbear_dss_host_key
Binary file not shown.
Binary file added mod/etc/dropbear/dropbear_rsa_host_key
Binary file not shown.
30 changes: 30 additions & 0 deletions mod/etc/init.d/S93dropbear
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/sh

start() {
dropbear -B
}

stop() {
killall dropbear
}

restart() {
stop
start
}

case "$1" in
start)
start
;;
stop)
;;
restart|reload)
restart
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac

exit $?

0 comments on commit d07728d

Please sign in to comment.