Re: dhcpcd procedure
On Fri, Oct 01, 1999 at 12:28:36PM -0400, Dpk wrote: I recently adopted dhcpcd... previous versions of dhcpcd would restart during upgrades, which obviously is bad for those doing it remotely. Since my recent upload does not restart dhcpcd, I need to start it for those upgrading from previous versions that did stop the daemon. What would be the best way to check for this? A simple 'ps |grep dhcpcd' ? Would doing so make my package dependent on procps? Maybe you could use the pidof utility, which comes with sysvinit (which is Essential: yes package)? is there a convenient way to check the installed version of dhcpcd someway? From the packaging manual: 3. 1. If the package is being upgraded, call: new-preinst upgrade old-version When we configure a package (this happens with `dpkg --install', or with `--configure'), we first update the conffiles and then call: postinst configure most-recently-configured-version So, you could put something like this in the preinst: if [ $1 = upgrade -a $2 ]; then whatever you need to do fi Or this in postinst: if [ $1 = configure -a $2 ]; then whatever you need to do fi And yes, this question would be more appropriate for debian-mentors list. -- enJoy -*/\*- don't even try to pronounce my first name
Re: dhcpcd procedure
On 01-Oct-99, 11:28 (CDT), Dpk [EMAIL PROTECTED] wrote: What would be the best way to check for this? A simple 'ps |grep dhcpcd' ? Would doing so make my package dependent on procps? or is there a convenient way to check the installed version of dhcpcd someway? As others have said, check the arguments to your postinst. Here's an example excerpt: if [ $1 = configure -a -n $2 ] dpkg --compare-versions $2 lt 3.0pl1-43 ; then echo This is an upgrade from an old version -- restart daemon fi Of course, you'd replace 3.0pl1-43 with the version number of the *first* version that *doesn't* need to perform the special action. Steve -- Steve Greenland [EMAIL PROTECTED] (Please do not CC me on mail sent to this list; I subscribe to and read every list I post to.)
dhcpcd procedure
I recently adopted dhcpcd... previous versions of dhcpcd would restart during upgrades, which obviously is bad for those doing it remotely. Since my recent upload does not restart dhcpcd, I need to start it for those upgrading from previous versions that did stop the daemon. What would be the best way to check for this? A simple 'ps |grep dhcpcd' ? Would doing so make my package dependent on procps? or is there a convenient way to check the installed version of dhcpcd someway? Being new the development group, I'm not sure if this is best asked here or on debian-mentors... so please let me know if this thread should start elsewhere. Thanks, Dennis
Re: dhcpcd procedure
Dpk [EMAIL PROTECTED] wrote: What would be the best way to check for this? A simple 'ps |grep dhcpcd' ? Would doing so make my package dependent on procps? or is there a convenient way to check the installed version of dhcpcd someway? Check $2 Debian Packaging Manual --- 6.2. Summary of ways maintainer scripts are called -- * new-preinst `install' * new-preinst `install' old-version * new-preinst `upgrade' old-version * old-preinst `abort-upgrade' new-version * postinst `configure' most-recently-configured-version * old-postinst `abort-upgrade' new version * conflictor's-postinst `abort-remove' `in-favour' package new-version * deconfigured's-postinst `abort-deconfigure' `in-favour' failed-install-package version `removing' conflicting-package version * prerm `remove' * old-prerm `upgrade' new-version * new-prerm `failed-upgrade' old-version * conflictor's-prerm `remove' `in-favour' package new-version * deconfigured's-prerm `deconfigure' `in-favour' package-being-installed version `removing' conflicting-package version * postrm `remove' * postrm `purge' * old-postrm `upgrade' new-version * new-postrm `failed-upgrade' old-version * new-postrm `abort-install' * new-postrm `abort-install' old-version * new-postrm `abort-upgrade' old-version * disappearer's-postrm `disappear' roverwritr new-version -- I consume, therefore I am
Re: dhcpcd procedure
Previously Edward Betts wrote: Check $2 No, check $1. Wichertk -- == This combination of bytes forms a message written to you by Wichert Akkerman. E-Mail: [EMAIL PROTECTED] WWW: http://www.wi.leidenuniv.nl/~wichert/ pgpFA9lquWmra.pgp Description: PGP signature