pkg.subr (was Re: About a browser hier-like module)

Scot Hetzel swhetzel at gmail.com
Thu Feb 17 13:23:05 PST 2005


On Thu, 17 Feb 2005 10:22:42 +0100, Jose M Rodriguez
<josemi at freebsd.jazztel.es> wrote:
> ALso, I'm thinking in have something in the way of RC_SUBR to make very
> common pkg-scripts works as sh funtions (${LOCALBASE}/etc/pkg.subr,
> ${X11BASE}/etc/pkg.subr) to be sourced.
> 
> But someone may find this open to exploits or break some rules about
> ports. Let me know
> 
I am also interested in creating a common set of pkg subroutines
(pkg.subr) that all of the ports could use for the
pkg-install/pkg-deinstall scripts.

We could then define a common set of routines to do the following:

User/group functions
  - check for user/group
  - add user/group
  - remove user/group

file functions:
 - add/remove an entry to /etc/syslog.conf and /etc/newsyslog.conf
(see net/cvsup-mirror)
 - add/remove an entry in /etc/crontab (see net/cvsup-mirror)
 - add/modify/remove an entry in /etc/services (mail/cyrus-imapd*
requires "sieve" to be appended to the port 2000/tcp entry)"

The only problem I see is how to handle old systems that don't have
the "pkg.subr" file (possible a sysutils/pkg_subr port) and where is
this file going to be placed (/var/db/pkg?).


More information about the freebsd-gnome mailing list