On Saturday 11 September 2010 23:35:43 Torfinn Ingolfsen wrote:
> Hi,
> 
> On Sat, Sep 11, 2010 at 4:33 PM, Ion-Mihai Tetcu <ite...@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)
    },
  }
_______________________________________________
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"

Reply via email to