pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/18681: rc.d script does not allow starting hfaxd through inetd



The following reply was made to PR pkg/18681; it has been noted by GNATS.

From: David Holland <dholland-pbugs%netbsd.org@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: pkg/18681: rc.d script does not allow starting hfaxd through
 inetd
Date: Mon, 10 Aug 2015 06:18:45 +0000

 Here's a patch. Can someone test the new rc.d scripts before I commit?
 (if nobody does in a week or two I'll commit anyway, but I'd rather
 not commit untested stuff and I'm not in a position to be able to
 check myself)
 
 Index: Makefile
 ===================================================================
 RCS file: /cvsroot/pkgsrc/comms/hylafax/Makefile,v
 retrieving revision 1.71
 diff -u -r1.71 Makefile
 --- Makefile	12 Mar 2015 15:23:39 -0000	1.71
 +++ Makefile	10 Aug 2015 06:16:46 -0000
 @@ -1,6 +1,7 @@
  # $NetBSD: Makefile,v 1.71 2015/03/12 15:23:39 tnn Exp $
  
  DISTNAME=	hylafax-6.0.6
 +PKGREVISION=	1
  CATEGORIES=	comms
  MASTER_SITES=	ftp://ftp.hylafax.org/source/
  
 @@ -32,7 +33,7 @@
  
  FAXUSER?=	uucp
  FAXGROUP?=	dialer
 -RCD_SCRIPTS=	hylafax
 +RCD_SCRIPTS=	hfaxd faxq
  
  EGDIR=		share/examples/hylafax
  
 Index: files/faxq.sh
 ===================================================================
 RCS file: files/faxq.sh
 diff -N files/faxq.sh
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/faxq.sh	10 Aug 2015 06:16:46 -0000
 @@ -0,0 +1,21 @@
 +#!@RCD_SCRIPTS_SHELL@
 +#
 +# $NetBSD$
 +
 +# PROVIDE: faxq
 +# REQUIRE: DAEMON
 +# KEYWORD: shutdown
 +
 +$_rc_subr_loaded . /etc/rc.subr
 +
 +name=faxq
 +rcvar=$name
 +command=@PREFIX@/sbin/faxq
 +command_args=
 +#pidfile=@VARBASE@/run/faxq.pid
 +required_files=@VARBASE@/spool/hylafax/etc/config
 +
 +load_rc_config $name
 +run_rc_command "$1"
 +
 +	
 \ No newline at end of file
 Index: files/hfaxd.sh
 ===================================================================
 RCS file: files/hfaxd.sh
 diff -N files/hfaxd.sh
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/hfaxd.sh	10 Aug 2015 06:16:46 -0000
 @@ -0,0 +1,21 @@
 +#!@RCD_SCRIPTS_SHELL@
 +#
 +# $NetBSD$
 +
 +# PROVIDE: hfaxd
 +# REQUIRE: DAEMON
 +# KEYWORD: shutdown
 +
 +$_rc_subr_loaded . /etc/rc.subr
 +
 +name=hfaxd
 +rcvar=$name
 +command=@PREFIX@/libexec/hfaxd
 +command_args="-i 4559 -o 4557 -s 444"
 +#pidfile=@VARBASE@/run/hfaxd.pid
 +required_files=@VARBASE@/spool/hylafax/etc/config
 +
 +load_rc_config $name
 +run_rc_command "$1"
 +
 +	
 \ No newline at end of file
 Index: files/hylafax.sh
 ===================================================================
 RCS file: files/hylafax.sh
 diff -N files/hylafax.sh
 --- files/hylafax.sh	20 Sep 2002 02:01:55 -0000	1.4
 +++ /dev/null	1 Jan 1970 00:00:00 -0000
 @@ -1,35 +0,0 @@
 -#!@RCD_SCRIPTS_SHELL@
 -#
 -# $NetBSD: hylafax.sh,v 1.4 2002/09/20 02:01:55 grant Exp $
 -#
 -# PROVIDE: hylafax
 -# REQUIRE: DAEMON
 -
 -command=${1:-start}
 -
 -case ${command} in
 -start)
 -	if [ -x @PREFIX@/libexec/hfaxd -a -f /var/spool/hylafax/etc/config ] ; then
 -	    echo -n 'Starting hfaxd'
 -	    @PREFIX@/libexec/hfaxd -i 4559 -o 4557 -s 444 
 -
 -	    echo ' faxq.'
 -	    @PREFIX@/sbin/faxq
 -	fi
 -	;;
 -stop)
 -	PIDS=`ps -ax -o pid,command|egrep '[ /](faxq|hfaxd) '|awk '{printf " " $1}'`
 -	if [ -n "$PIDS" ];then
 -		echo "Stopping hylafax pids$PIDS."
 -		kill -TERM $PIDS
 -	else
 -		echo "hylafax not running?"
 -	fi
 -	;;
 -restart)
 -	( $0 stop )
 -	sleep 1
 -	$0 start
 -	;;
 -esac
 -exit 0
 
 
 -- 
 David A. Holland
 dholland%netbsd.org@localhost
 


Home | Main Index | Thread Index | Old Index