summaryrefslogtreecommitdiff
path: root/package/openct
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2010-12-15 23:06:13 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2010-12-15 23:06:13 +0100
commitc5ddc1d3d64bc57576f4c52bd54d220883ebd58a (patch)
treeb328badfbd7e1482c1093521fb3c1dee266f6870 /package/openct
parent38af8185ea05a1c5d1abb32a68a025e3b4afa4d6 (diff)
add startup script
Diffstat (limited to 'package/openct')
-rw-r--r--package/openct/Makefile2
-rw-r--r--package/openct/files/openct.init28
-rw-r--r--package/openct/files/openct.postinst3
3 files changed, 32 insertions, 1 deletions
diff --git a/package/openct/Makefile b/package/openct/Makefile
index 635f95d74..1164c4a13 100644
--- a/package/openct/Makefile
+++ b/package/openct/Makefile
@@ -5,7 +5,7 @@ include ${TOPDIR}/rules.mk
PKG_NAME:= openct
PKG_VERSION:= 0.6.20
-PKG_RELEASE:= 1
+PKG_RELEASE:= 2
PKG_MD5SUM:= a1da3358ab798f1cb9232f1dbababc21
PKG_DESCR:= drivers for smart card readers
PKG_SECTION:= crypto
diff --git a/package/openct/files/openct.init b/package/openct/files/openct.init
new file mode 100644
index 000000000..5f4b93c16
--- /dev/null
+++ b/package/openct/files/openct.init
@@ -0,0 +1,28 @@
+#!/bin/sh
+#PKG openct
+#INIT 60
+
+. /etc/rc.conf
+
+case $1 in
+autostop) ;;
+autostart)
+ test x"${openct:-NO}" = x"NO" && exit 0
+ exec sh $0 start
+ ;;
+start)
+ test -d /var/run/openct || mkdir -p /var/run/openct
+ /usr/sbin/openct-control init
+ ;;
+stop)
+ /usr/sbin/openct-control shutdown
+ ;;
+restart)
+ sh $0 stop
+ sh $0 start
+ ;;
+*)
+ echo "usage: $0 {start | stop | restart}"
+ exit 1
+esac
+exit $?
diff --git a/package/openct/files/openct.postinst b/package/openct/files/openct.postinst
new file mode 100644
index 000000000..c02a18c6d
--- /dev/null
+++ b/package/openct/files/openct.postinst
@@ -0,0 +1,3 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+add_rcconf openct openct NO