Subject: Re: rc.d scripts and there variable settings (was: CVS commit: sharesrc/share/man/man5)
To: None <tech-pkg@netbsd.org>
From: Klaus Heinz <k.heinz.sep.zwei@onlinehome.de>
List: tech-pkg
Date: 09/04/2002 02:12:54
Bernd Ernesti wrote:

> Oh, and btw, we do not remove these rc.d scripts during a pkg delete.

Maybe I misunderstand your problem but...

  $ pkg_add spamassassin-2.40.tgz
  ...
  Installing configuration files for spamassassin-2.40:

    /usr/pkg/etc/spamassassin/local.cf
    /usr/pkg/etc/spamassassin/user_prefs.template
    /usr/pkg/etc/rc.d/spamd
    /etc/rc.d/spamd
  ...
  $ ls -al /etc/rc.d/spamd /usr/pkg/etc/rc.d/spamd
  -rwxr-xr-x  1 root  wheel  1532 Sep  4 00:31 /etc/rc.d/spamd
  -r-xr-xr-x  1 root  wheel  1532 Sep  4 00:31 /usr/pkg/etc/rc.d/spamd
  $ pkg_delete spamassassin
  $ ls -al /etc/rc.d/spamd /usr/pkg/etc/rc.d/spamd
  ls: /etc/rc.d/spamd: No such file or directory
  ls: /usr/pkg/etc/rc.d/spamd: No such file or directory

So there is a mechanism to create/remove those files in rc.d.

The downside (for me) is this:

  $ pkg_info -F /etc/rc.d/spamd 
  pkg_info: No matching pkg for /usr/pkg/etc/rc.d/spamd

I cannot include those files in the PLIST because they are
copied/deleted automatically by pkgsrc. Thus, we have files the command
'pkg_info' cannot identify.

ciao
     Klaus