Best practice to remove PostgreSQL 8 server from NetInfo?
"Tabitha McNerney" <[email protected]>
| Newsgroups | gmane.os.opendarwin.darwinports |
|---|---|
| Message-ID | <[email protected]> |
Hello all,
After building the postgresql8 port (with the server variant), I noticed
that the user named "postgres8" with a group named "postgres" was added to
my Mac's NetInfo domain (its a standalone system and does not use a
directory service other than its own NetInfo database). In the postgresql8
Portfile I could understand enough of Tcl to see where this happens
(addgroup, set gid, adduser) ...
pre-destroot {
> addgroup ${dbgrp}
> set gid [existsgroup ${dbgrp}]
> adduser ${dbuser} shell=/bin/sh gid=${gid} \
> home=${prefix}/var/db/pgsql8 \
> realname=PostgreSQL-8\ Server
> xinstall -m 755 -d ${destroot}${logdir}
> system "touch ${destroot}${logdir}/postgres.log"
> system "chown ${dbuser}:${dbgrp} ${destroot}${logdir}/postgres.log"
>
>
However, after uninstalling the port and cleaning it, the entry in my Mac's
Netinfo database remained. So I deleted it manually (I used the NetInfo
graphical browser to do this). I then re-installed the port with the server
variant and it did not, a second time, add the user and group to the NetInfo
database.
This is a bit tricky and I'm wondering what is the best practice for
removing any users and groups that Darwin Ports adds to directories such as
NetInfo or Open Directory? For example, installed nagios and noticed the
same thing (a nagios user was added to my NetInfo database).
Thank you for any suggestions,
T.