summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Väth <martin@mvath.de>2014-12-26 10:13:22 +0100
committerMartin Väth <martin@mvath.de>2015-10-11 10:49:20 +0200
commitdc2f073b5d11a49e32e24f080c34a269d2662912 (patch)
treecd477d936814d80f6069548c8c7a03e8c420d169 /net-dialup/martian-modem/files
parentBump zram-init, firewall-mv, schedule, squashmount (diff)
downloadmv-dc2f073b5d11a49e32e24f080c34a269d2662912.tar.gz
mv-dc2f073b5d11a49e32e24f080c34a269d2662912.tar.bz2
mv-dc2f073b5d11a49e32e24f080c34a269d2662912.zip
Bump sundtek-tv, martian-modem
Diffstat (limited to 'net-dialup/martian-modem/files')
-rw-r--r--net-dialup/martian-modem/files/martian-modem.init.d41
1 files changed, 19 insertions, 22 deletions
diff --git a/net-dialup/martian-modem/files/martian-modem.init.d b/net-dialup/martian-modem/files/martian-modem.init.d
index 3c5b8561..540d14c5 100644
--- a/net-dialup/martian-modem/files/martian-modem.init.d
+++ b/net-dialup/martian-modem/files/martian-modem.init.d
@@ -1,7 +1,4 @@
-#!/sbin/runscript
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-dialup/martian-modem/files/martian-modem.init.d,v 1.1 2012/12/15 16:41:36 pacho Exp $
+#!/sbin/openrc-run
daemon=/usr/sbin/martian_modem
description="Initscript to run the userspace daemon for winmodems supported by martian-modem driver"
@@ -15,32 +12,32 @@ description="Initscript to run the userspace daemon for winmodems supported by m
pidfile=/var/run/${SVCNAME}.pid
depend() {
- need localmount
- [ "${use_syslog}" = "YES" ] && use syslog
+ need localmount
+ [ "${use_syslog}" = "YES" ] && use syslog
}
start() {
- if [ -e /proc/modules ] ; then
+ if [ -e /proc/modules ] ; then
local modem=
for modem in /dev/modem /dev/ttySM[0-9]* ; do
[ -e "${modem}" ] && break
done
- fi
- if [ ! -e "${modem}" ] ; then
- modprobe martian-dev || eerror $? "Error loading martian-dev module"
- fi
+ fi
+ if [ ! -e "${modem}" ] ; then
+ modprobe martian-dev || eerror $? "Error loading martian-dev module"
+ fi
- if ! yesno "${use_syslog}" ; then
- martian_opts="${MARTIAN_OPTS} --log=${logfile}"
- else
- martian_opts="${MARTIAN_OPTS} --syslog"
- fi
-
- ebegin "Starting ${SVCNAME}"
- start-stop-daemon --start --exec ${daemon} --user ${user}:${group} \
- --pidfile ${pidfile} --make-pidfile --background \
- -- ${martian_opts} --debug=${debug_level} ${device}
- eend $?
+ if ! yesno "${use_syslog}" ; then
+ martian_opts="${MARTIAN_OPTS} --log=${logfile}"
+ else
+ martian_opts="${MARTIAN_OPTS} --syslog"
+ fi
+
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --exec ${daemon} --user ${user}:${group} \
+ --pidfile ${pidfile} --make-pidfile --background \
+ -- ${martian_opts} --debug=${debug_level} ${device}
+ eend $?
}
stop() {