Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
674 changes: 674 additions & 0 deletions shellinabox/LICENSE

Large diffs are not rendered by default.

68 changes: 24 additions & 44 deletions shellinabox/Makefile
Original file line number Diff line number Diff line change
@@ -1,64 +1,44 @@
#
# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# Initial port of shellinabox to OpenWrt - Jan Jaeger 25-MAR-2010

include $(TOPDIR)/rules.mk

PKG_NAME:=shellinabox
PKG_VERSION:=2.10
PKG_RELEASE:=1
PKG_VERSION:=2.20
PKG_RELEASE:=$(PKG_SOURCE_VERSION)

PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=HEAD
PKG_SOURCE_URL:=https://github.com/OnionIoT/shellinabox.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)
PKG_SOURCE:=$(PKG_NAME).tar.gz
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
PKG_SOURCE_URL:=https://github.com/shellinabox/shellinabox.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=98e6eebc6c2026fb126a458c6cb5a2541447258e
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz

#PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
#PKG_SOURCE_URL:=http://shellinabox.googlecode.com/files
#PKG_MD5SUM:=0e144910d85d92edc54702ab9c46f032
PKG_FIXUP:=autoreconf

include $(INCLUDE_DIR)/package.mk

define Package/shellinabox
SECTION:=net
CATEGORY:=Network
TITLE:=Shell In A Box
DEPENDS:= zlib
URL:=http://shellinabox.googlecode.com
define Package/shellinabox
SECTION:=net
CATEGORY:=Network
TITLE:=a web based terminal emulator
URL:=https://github.com/shellinabox/shellinabox
DEPENDS:=+zlib +libopenssl +busybox +@BUSYBOX_CUSTOM +@BUSYBOX_CONFIG_LOGIN
endef

define Package/shellinabox/description
Web based AJAX terminal emulator
Shell In A Box implements a web server that
can export arbitrary command line tools to
a web based terminal emulator. This emulator
is accessible to any JavaScript and CSS
enabled web browser and does not require any additional browser plugins.
endef

define Build/Configure
$(call Build/Configure/Default)
endef

define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
BINDIR="/usr/sbin" \
all
endef
CONFIGURE_ARGS += --disable-utmp

define Package/shellinabox/install
# install the binary
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/shellinaboxd $(1)/usr/sbin/
# install the init.d file
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
# install the css file
$(INSTALL_DIR) $(1)/usr/lib/shellinabox
$(INSTALL_BIN) ./files/style.css $(1)/usr/lib/shellinabox/style.css
$(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d $(1)/etc/shellinabox
$(INSTALL_BIN) $(PKG_BUILD_DIR)/shellinaboxd $(1)/usr/sbin
$(INSTALL_BIN) ./files/shellinaboxd.init $(1)/etc/init.d/shellinaboxd
$(INSTALL_DATA) $(PKG_BUILD_DIR)/shellinabox/*.css $(1)/etc/shellinabox
$(PKG_BUILD_DIR)/make-chained-cert.sh > $(1)/etc/shellinabox/certificate.pem
endef

$(eval $(call BuildPackage,shellinabox))
6 changes: 6 additions & 0 deletions shellinabox/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# shellinabox
OpenWrt packet of shellinabox

$ git clone https://github.com/paradislover/shellinabox.git

$ make package/shellinabox/compile
17 changes: 0 additions & 17 deletions shellinabox/files/shellinabox.init

This file was deleted.

17 changes: 17 additions & 0 deletions shellinabox/files/shellinaboxd.init
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2015 snqu.com

USE_PROCD=1
START=99

BIN=/usr/sbin/shellinaboxd

start_service() {
procd_open_instance
procd_set_param command $BIN -u root -c /etc/shellinabox \
--css=/etc/shellinabox/black-on-white.css \
--css=/etc/shellinabox/white-on-black.css \
--user-css Normal:+/etc/shellinabox/black-on-white.css,Reverse:-/etc/shellinabox/white-on-black.css
procd_close_instance
}

24 changes: 0 additions & 24 deletions shellinabox/files/style.css

This file was deleted.

22 changes: 0 additions & 22 deletions shellinabox/old/000-makefile-arch.patch

This file was deleted.

105 changes: 0 additions & 105 deletions shellinabox/old/001-makefile-objcopy.patch

This file was deleted.

20 changes: 0 additions & 20 deletions shellinabox/old/002-httpconn-isnan.patch

This file was deleted.

5 changes: 0 additions & 5 deletions shellinabox/old/readme

This file was deleted.

13 changes: 13 additions & 0 deletions shellinabox/patches/001-fix-compile-issue.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/shellinabox/launcher.c b/shellinabox/launcher.c
index ba54b36..c802e00 100644
--- a/shellinabox/launcher.c
+++ b/shellinabox/launcher.c
@@ -769,7 +769,7 @@ void closeAllFds(int *exceptFds, int num) {
}

#if !defined(HAVE_PTSNAME_R)
-static int ptsname_r(int fd, char *buf, size_t buflen) {
+int ptsname_r(int fd, char *buf, size_t buflen) {
// It is unfortunate that ptsname_r is not universally available.
// For the time being, this is not a big problem, as ShellInABox is
// single-threaded (and so is the launcher process). But if this