summaryrefslogtreecommitdiffstats
path: root/extra/brltty/brltty
diff options
context:
space:
mode:
authortnut <thierryn1 at hispeed dot ch>2010-04-21 18:37:00 +0200
committertnut <thierryn1 at hispeed dot ch>2010-04-21 18:37:00 +0200
commit399204c03b1f0c4239479860079471ba58468ffc (patch)
tree5c643be56dcdafdea048dcae8db84aedea50ca02 /extra/brltty/brltty
parent640a51dca44d8d9a03cff52d762e530b1d188bb2 (diff)
downloadnutyx-extra-399204c03b1f0c4239479860079471ba58468ffc.tar.gz
nutyx-extra-399204c03b1f0c4239479860079471ba58468ffc.tar.bz2
nutyx-extra-399204c03b1f0c4239479860079471ba58468ffc.tar.xz
nutyx-extra-399204c03b1f0c4239479860079471ba58468ffc.zip
brltty, ajustement du service, du pkgfile et du footprint
Diffstat (limited to 'extra/brltty/brltty')
-rw-r--r--extra/brltty/brltty46
1 files changed, 7 insertions, 39 deletions
diff --git a/extra/brltty/brltty b/extra/brltty/brltty
index 5ed21a52d..1effd561c 100644
--- a/extra/brltty/brltty
+++ b/extra/brltty/brltty
@@ -2,8 +2,8 @@
daemon_name=brltty
-. /etc/rc.conf
-. /etc/rc.d/functions
+. /etc/sysconfig/rc
+. $rc_functions
. /etc/conf.d/$daemon_name.conf
get_pid() {
@@ -12,43 +12,12 @@ get_pid() {
case "$1" in
start)
- stat_busy "Starting $daemon_name daemon"
-
- PID=$(get_pid)
- if [ -z "$PID" ]; then
- [ -f /var/run/$daemon_name.pid ] && rm -f /var/run/$daemon_name.pid
- # RUN
- $daemon_name $brltty_args
- #
- if [ $? -gt 0 ]; then
- stat_fail
- exit 1
- else
- echo $(get_pid) > /var/run/$daemon_name.pid
- add_daemon $daemon_name
- stat_done
- fi
- else
- stat_fail
- exit 1
- fi
- ;;
+ boot_mesg "Starting $daemon_name daemon"
+ loadproc /usr/bin/$daemon_name;;
stop)
- stat_busy "Stopping $daemon_name daemon"
- PID=$(get_pid)
- # KILL
- [ ! -z "$PID" ] && kill $PID &> /dev/null
- #
- if [ $? -gt 0 ]; then
- stat_fail
- exit 1
- else
- rm -f /var/run/$daemon_name.pid &> /dev/null
- rm_daemon $daemon_name
- stat_done
- fi
- ;;
+ loadproc "Stopping $daemon_name daemon"
+ killproc $daemon_name;;
restart)
$0 stop
@@ -57,8 +26,7 @@ case "$1" in
;;
status)
- stat_busy "Checking $daemon_name status";
- ck_status $daemon_name
+ statusproc $daemon_name
;;
*)