pkgsrc-Bugs archive

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

pkg/36192: sysutils/apcupsd has a bad rc.d file



>Number:         36192
>Category:       pkg
>Synopsis:       sysutils/apcupsd has a bad rc.d file
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Apr 22 14:20:01 +0000 2007
>Originator:     Steven M. Bellovin
>Release:        NetBSD 4.99.17
>Organization:
>Environment:
        
        
System: NetBSD bigboy.machshav.com 4.99.17 NetBSD 4.99.17 (BIGBOY) #0: Sun Apr 
22 00:44:13 EDT 2007 
smb%bigboy.machshav.com@localhost:/usr/BUILD/obj/sys/arch/i386/compile/BIGBOY 
i386
Architecture: i386
Machine: i386
>Description:
        The sample rc.d file isn't right for the NetBSD rc.d system.
>How-To-Repeat:
        See above
>Fix:
        Here's the script I'm using, though I suspect that some
        metavariables need to be used instead, and perhaps a
        variable config file.

        #!/bin/sh
        #

        # PROVIDE: apcupsd
        # REQUIRE: mail

        $_rc_subr_loaded . /etc/rc.subr

        name="apcupsd"
        rcvar=$name
        command="/usr/pkg/sbin/${name}"
        pidfile="/var/run/${name}.pid"
        required_files="/usr/pkg/etc/apcupsd/${name}.conf"
        command_args="--kill-on-powerfail"
        status_cmd="apcupsd_status"

        extra_commands="status"

        apcupsd_status()
        {
                /usr/pkg/sbin/apcaccess status
        }

        load_rc_config $name
        run_rc_command "$1"

>Unformatted:
        
        



Home | Main Index | Thread Index | Old Index