From dc2f073b5d11a49e32e24f080c34a269d2662912 Mon Sep 17 00:00:00 2001 From: Martin Väth Date: Fri, 26 Dec 2014 10:13:22 +0100 Subject: Bump sundtek-tv, martian-modem --- .../martian-modem/files/martian-modem.init.d | 41 ++++++++++------------ 1 file changed, 19 insertions(+), 22 deletions(-) (limited to 'net-dialup/martian-modem/files') 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() { -- cgit v1.2.3-65-gdbad