wip/shellinabox: split out options; make rc.d script netbsd-style
authorast <ast@NetBSD.org>
Thu, 20 Oct 2016 12:39:25 +0000 (14:39 +0200)
committerast <ast@NetBSD.org>
Thu, 20 Oct 2016 12:39:25 +0000 (14:39 +0200)
shellinabox/Makefile
shellinabox/files/shellinaboxd.in

index b1bb67e3441d2c0d0bae9d25d58310b67e74cd6c..cf4db401c525a068cb6ff21eaffb7b4fca42cc89 100644 (file)
@@ -15,9 +15,11 @@ COMMENT=        Shell In A Box implements a web server for terminal emulation
 LICENSE=        gnu-gpl-v2
 
 EXTRACT_USING=  gtar
+
 USE_TOOLS+=     gtar aclocal automake autoconf gm4 gmake autoheader
 USE_LANGUAGES=  c
 USE_LIBTOOL=    yes
+
 GNU_CONFIGURE=  yes
 
 .include "../../mk/bsd.prefs.mk"
@@ -33,7 +35,7 @@ RCD_SCRIPT_SRC.shellinaboxd = ${WRKSRC}/shellinaboxd.in
 
 SUBST_CLASSES+=         sib
 SUBST_STAGE.sib=        pre-configure
-SUBST_MESSAGE.sib=      Fixing shellinaboxd user/group defaults
+SUBST_MESSAGE.sib=      Crafting a shellinaboxd rc.d script with sane defaults
 SUBST_FILES.sib+=       ${WRKSRC}/shellinaboxd.in
 SUBST_VARS.sib+=        PREFIX SIB_USER SIB_GROUP
 
@@ -50,4 +52,6 @@ pre-configure:
                autoconf && \
                automake --copy --add-missing --foreign
 
+.include "options.mk"
+
 .include "../../mk/bsd.pkg.mk"
index 61959ba4c2d0421459a18ca413508a1bba4c7ace..a9956d41e4be14981362fedea3155172fede4f45 100644 (file)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-# $FreeBSD$
+# $NetBSD$
 #
 # Shell in a Box Daemon startup script
 #
@@ -9,7 +9,7 @@
 # KEYWORD: shutdown
 
 #
-# Add the following to /etc/rc.conf[.local] to enable this service
+# Add the following to /etc/rc.conf to enable this service
 #
 # shellinaboxd="YES"
 #
@@ -27,9 +27,7 @@ rcvar=${name}
 
 command="@PREFIX@/bin/${name}"
 
-load_rc_config $name
-
-shellinaboxd_enable=${shellinaboxd_enable:-"NO"}
+shellinaboxd=${shellinaboxd:-"NO"}
 shellinaboxd_user=${shellinaboxd_user:-"@SIB_USER@"}
 shellinaboxd_group=${shellinaboxd_group:-"@SIB_GROUP@"}
 shellinaboxd_port=${shellinaboxd_port:-"4200"}