Andreas Beckmann <[email protected]> writes: > On 2013-04-09 12:29, Arnaud Patard wrote: > >>> The postinst I don't really get - why are there that many rm's on >>> configuration files? >> >> The files (for now) are created by waagent. This means: >> - if the package is removed (but not purged), we won't be able to purge >> it by using waagent -uninstall (since waagent will be gone) >> - iirc, if the package is removed & purged, the purge step will be called >> after the removal of waagent so, again, using waagent -uninstall won't >> work. >> >> So, the postrm script has to remove them "by hand". > > Yes. The post*rm*. But not the post*inst* script. >
oh. postinst. Sorry, misread. postinst rm stuff was to put system back to a clean state in case of failures during installation. >>> The configuration step via >>> waagent --setup --force >>> is not suitable for Debian systems, as it does not preserve user >>> modifications to the configuration files it creates, which is a >>> policy violation. >>> Try e.g. >>> dpkg-reconfigure waagent >>> after editing all the configuration files. >> >> The main problem is that I've seen any guaranty that the files created >> by the agent won't change. I can try to be clever and check if >> there's a waagent.conf file or the init script and in this case not run >> waagent --setup --force but I fear of the breakages it may >> creates. We have to be careful as the system running it is a Azure VM so >> if we break stuff, it may be hard to recover. > > Can't you use waagent --setup to generate the configuration files at > build time in some other PREFIX than "/"? And ship them instead of doing > any maintainer script magic? Not without patching unfortunately. Arnaud -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

