Ports with daemons on uninstall...

Ian FREISLICH ianf at clue.co.za
Mon Jul 15 14:23:23 UTC 2013


Walter Hurry wrote:
> On Mon, 15 Jul 2013 08:34:05 -0500, Mark Felder wrote:
> 
> > As long as this behavior only happens during pkg installs and never with
> > ports, I'm OK. The worst is when a coworker forgets that the mysql port
> > stops the daemon and my coworker upgrades with portmaster... the daemon
> > is off the entire time mysql slowly compiles...
> 
> I'm not familiar with portmaster, since I use portupgrade. That does the 
> build first, then the deinstall old/install new. Seems a sensible 
> approach anyway, in case the build fails. Doesn't portmaster work 
> similarly?

Try doing a 'portupgrade -f isc-dhcp41-server' and watch it leave
dhcpd not running.

I eventually made the following change so that it wouldn't leave
my system in a broken state:

/usr/ports/net/isc-dhcp41-server # make clean
===>  Cleaning for isc-dhcp41-server-4.1.e_7,2
[fw2.smmt] /usr/ports/net/isc-dhcp41-server # svn diff
Index: pkg-plist
===================================================================
--- pkg-plist   (revision 323024)
+++ pkg-plist   (working copy)
@@ -1,6 +1,4 @@
 @comment $FreeBSD$
- at unexec %D/etc/rc.d/isc-dhcpd forcestop 2>/dev/null || true
-%%IPV6%%@unexec %D/etc/rc.d/isc-dhcpd6 forcestop 2>/dev/null || true
 @unexec if cmp -s %D/etc/dhcpd.conf.sample %D/etc/dhcpd.conf; then rm -f %D/etc/dhcpd.conf; fi
 etc/dhcpd.conf.sample
 @exec if [ ! -f %D/etc/dhcpd.conf ] ; then cp -p %D/%F %B/dhcpd.conf; fi

I don't mind it stopping the daemon, but if it's going to automatically
stop it, it should automatically start it too.  It's also not
consistent - random sample of two: exim and quagga just leave the
daemon running.  I'm just asking if there's a stated project guideline
for what should happen because at the moment it's hard to know what
to expect.  Maybe its as simple as an install exec that does a
'service foo start'.  If it's a first install it will fail because
foo_enable="yes" won't be set in /etc/rc.conf.

Personally, I'd rather that the package management system ports,pkg,etc
doesn't take liberties with my running daemons.  If I want to kill
them off, I'll kill them off, but there have been several times
where I've left uninstalled things running while the system was in
flux during an upgrade.  It was nice to be able to do that.

Ian

-- 
Ian Freislich


More information about the freebsd-current mailing list