Subject: pkg/32017: pkgtools/rc.subr/files/rc.d/SERVERS gets error on Solaris 10
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <nakaji@jp.freebsd.org>
List: pkgsrc-bugs
Date: 11/08/2005 10:37:00
>Number:         32017
>Category:       pkg
>Synopsis:       pkgtools/rc.subr/files/rc.d/SERVERS gets error on Solaris 10
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Nov 08 10:37:00 +0000 2005
>Originator:     NAKAJI Hiroyuki
>Release:        Solaris 10 x86
>Organization:
>Environment:
SunOS deepsea.c3922.takamatsu-nct.ac.jp 5.10 Generic i86pc i386 i86pc
>Description:
I installed pkgtools/rc.subr and pkgtools/rcorder in order to use rc.d scripts on my SOlaris 10. I made a startup script as /etc/init.d/local.

When I ran this "local" script, I got an error:

<unset_progname>: requirement `mountcritremote' in file `/etc/rc.d/SERVERS' has no providers.

My "local" script is like this:

#!/bin/ksh

if [ ! -f /etc/rc.subr -o ! -x /usr/pkg/sbin/rcorder -o ! -f /etc/rc.conf ]; then
        exit 1
fi

. /etc/rc.subr
. /etc/rc.conf
_rc_conf_loaded=true

if ! checkyesno rc_configured; then
        exit 1
fi

case "$1" in
"start")
        files=`/usr/pkg/sbin/rcorder -s nostart ${rc_rcorder_flags} /etc/rc.d/*`

        for _rc_elem in $files; do
                run_rc_script $_rc_elem start
        done
        ;;

"stop")
        files=`/usr/pkg/sbin/rcorder -k nostart ${rc_rcorder_flags} /etc/rc.d/*`

        for _rc_elem in `reverse_list $files`; do
                run_rc_script $_rc_elem stop
        done
        ;;

*)
        echo "Usage: $0 { start | stop }"
        exit 1
        ;;
esac

exit 0
>How-To-Repeat:

>Fix:
Here is a diff for pkgtools/rc.subr/files/rc.d/SERVERS.

Index: rc.d/SERVERS
===================================================================
RCS file: /cvsroot/pkgsrc/pkgtools/rc.subr/files/rc.d/SERVERS,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 SERVERS
--- rc.d/SERVERS        19 Jun 2003 16:07:12 -0000      1.1.1.1
+++ rc.d/SERVERS        8 Nov 2005 10:03:45 -0000
@@ -4,7 +4,6 @@
 #
 
 # PROVIDE: SERVERS
-# REQUIRE: mountcritremote
 
 #      This is a dummy dependency, for early-start servers relying on
 #      some basic configuration.