Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Sep 2010 09:43:05 +0200
From:      Stefan Ehmann <shoesoft@gmx.net>
To:        freebsd-ports@freebsd.org
Cc:        Torfinn Ingolfsen <tingox@gmail.com>
Subject:   Re: [ports/net/isc-dhcp*] Don't stop DHCP related daemons
Message-ID:  <201009120943.05310.shoesoft@gmx.net>
In-Reply-To: <AANLkTimxpLKmvZc%2Bybsav8Mrpjy_aopL2qT3m8cbYL-q@mail.gmail.com>
References:  <20100911222902.bb57444a.nork@FreeBSD.org> <20100911173359.68d71af6@it.buh.tecnik93.com> <AANLkTimxpLKmvZc%2Bybsav8Mrpjy_aopL2qT3m8cbYL-q@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Saturday 11 September 2010 23:35:43 Torfinn Ingolfsen wrote:
> Hi,
> 
> On Sat, Sep 11, 2010 at 4:33 PM, Ion-Mihai Tetcu <itetcu@freebsd.org> wrote:
> > This 'stop the service before we install' seems to be a new fashion,
> > usually unneeded/disruptive.
> > IMO this should only happen when it's really needed, and with some big
> > warning printed.
> 
> And perhaps with a restart service attempt afterwards? (maybe interactive
> as in "do you want me to restart the service y/n?")
> Just my 0.02 euros.

In general, the only safe method is to stop the service before deinstall and 
to start it after the upgrade. If a service must not be interrupted, it 
probably shouldn't be updated in first place.

Quite some time ago one daemon always ceased to work for me after a 
portupgrade. I've added the following lines in my pkgtools.conf (taken from 
the sample file) and everything worked fine afterwards.

  BEFOREDEINSTALL = {
    # Automatically stop the service for each package that has a
    # rc script enabled
    '*' => proc { |origin|
      cmd_stop_rc(origin)
    },
  }

  AFTERINSTALL = {
    # Automatically start the server for each package that
    # installs a rc file enabled
    '*' => proc { |origin|
      cmd_start_rc(origin)
    },
  }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009120943.05310.shoesoft>