[Debconf-devel] debconf (and dbconfig-common) vs. invoke-rc.d start

Thorsten Glaser t.glaser at tarent.de
Thu Jul 24 14:17:58 UTC 2014


(TOFU for benefit of Sean who did not get the initial mail.)

I’ve added debugging code to my postrm script and discovered
two things:

• The script is called twice: first remove, then purge
• /usr/share/dbconfig-common/dpkg/postrm only has an
  action for purge, none for remove

Sean, will it stay like that? If so, I can change my postrm
script to call db_stop followed by the Apache stuff in the
'remove' case, and not do the Apache stuff in the 'purge'
case? What do you all think?


On Thu, 24 Jul 2014, Thorsten Glaser wrote:

> Hi *,
> 
> I need to run debconf *after* calling invoke-rc.d {stop,start} in
> a postrm script. This is tricky.
> 
> Reason: #755908
> 
> So, my postrm basically must do these steps in order:
> 
> • disable the apache config
> • if apache is running,
>   ‣ stop apache
>   ‣ then start apache again¹
> ⇒ ²
> • purge the database
> • purge dbconfig-common’s debconf variables
> • purge the other config files/dirs and state dirs etc.
> 
> ① This really cannot be “reload”. I must make sure that all
>   httpd children die, so they cannot keep holding a DB connection.
> 
> To add insult to injury, I need this for squeeze and up.
> Plan is to upgrade the system from squeeze to something
> newer, but for that, I need to migrate the software from
> SQLite2 first, and I’m doing this while packaging it as
> proper Debian source package at the same time, thanks to
> the benefit that dbconfig-common is.
> 
> I cannot just source the debconf stuff at ② above, because
> the script is re-executed then…
> 
> I cannot send db_stop before starting the dæmon because I
> need to talk to debconf afterwards.
> 
> So, how?
> 
> Thanks in advance,
> //mirabilos (please keep me in Cc, I am not subscribed)
> -- 
> tarent solutions GmbH
> Rochusstraße 2-4, D-53123 Bonn • http://www.tarent.de/
> Tel: +49 228 54881-393 • Fax: +49 228 54881-235
> HRB 5168 (AG Bonn) • USt-ID (VAT): DE122264941
> Geschäftsführer: Dr. Stefan Barth, Kai Ebenrett, Boris Esser, Alexander Steeg
> 

//mirabilos
-- 
tarent solutions GmbH
Rochusstraße 2-4, D-53123 Bonn • http://www.tarent.de/
Tel: +49 228 54881-393 • Fax: +49 228 54881-235
HRB 5168 (AG Bonn) • USt-ID (VAT): DE122264941
Geschäftsführer: Dr. Stefan Barth, Kai Ebenrett, Boris Esser, Alexander Steeg



More information about the Debconf-devel mailing list