#!/sbin/runscript # Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ depend() { : } PORT=${SVCNAME#*.} args_var=ARGS_${PORT} ARGS=${!args_var} start() { if ! lsmod | grep -q netrom then ebegin "Loading netrom module" modprobe netrom eend $? fi ebegin "Starting nrattach for port ${PORT}" nrattach ${ARGS} ${PORT} eend $? } stop() { ebegin "Stopping nrattach for port ${PORT}" kill $( ps -o pid,args -C nrattach | grep ${PORT} | cut -c 1-5 ) eend $? }