aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sysutils/uhidd/Makefile1
-rw-r--r--sysutils/uhidd/files/uhidd.in22
2 files changed, 10 insertions, 13 deletions
diff --git a/sysutils/uhidd/Makefile b/sysutils/uhidd/Makefile
index e5605e3b884d..59530fb3b2af 100644
--- a/sysutils/uhidd/Makefile
+++ b/sysutils/uhidd/Makefile
@@ -3,6 +3,7 @@
PORTNAME= uhidd
PORTVERSION= 0.2.1
+PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= GOOGLE_CODE \
http://people.freebsd.org/~kaiw/distfiles/
diff --git a/sysutils/uhidd/files/uhidd.in b/sysutils/uhidd/files/uhidd.in
index 1e9cd29753bf..a1e9c208bd83 100644
--- a/sysutils/uhidd/files/uhidd.in
+++ b/sysutils/uhidd/files/uhidd.in
@@ -7,30 +7,26 @@
# REQUIRE: DAEMON cleanvar
# KEYWORD: nojail shutdown
-. /etc/rc.subr
-
# Usage:
# uhidd start ugenX.Y # start uhidd on device 'ugenX.Y'
# uhidd stop ugenX.Y # stop uhidd on device 'ugenX.Y'
# uhidd start # start uhidd on all ugen device.
# uhidd stop # stop all uhidd instances.
-name="uhidd"
+. /etc/rc.subr
+
+name=uhidd
rcvar=uhidd_enable
-command="%%PREFIX%%/sbin/${name}"
-start_cmd="uhidd_start"
-required_modules="vkbd"
-pidprefix="/var/run/uhidd"
load_rc_config $name
-: ${uhidd_enable="NO"}
+: ${uhidd_enable:=NO}
-if [ -n "$2" ]; then
- pidfile="${pidprefix}.`basename $2`.pid"
-else
- pidfile=
-fi
+command=%%PREFIX%%/sbin/${name}
+start_cmd=uhidd_start
+required_modules=vkbd
+pidprefix=/var/run/uhidd
+pidfile=${2+$pidprefix.`basename $2`.pid}
uhidd_start()
{