Hello, On Jan 9 10:01 Dan Stromberg wrote (shortened):
We want to automate our install as much as possible, and some here believe that rpm is the right way to automate it, including rpm file dual ownership.
For example, we want to throw a getty on ttyS0 - for that we need to change /etc/inittab. The approach so far has been to replace /etc/inittab. I'm now trying to gently pitch changing it from a post and postun.
Blindly replace whatever config file could be destructive. Think about when the admin has changed it intentionally according to his special needs. Think about the mess when several different packages would blindly replace a particular config file. For example at least I would be upset if your package just replaces my /etc/inittab so that I may get back our default runlevel 5 because I have intentionally set runlevel 3. Business server admins may even like to kill you ;-) if unexpectedly a special server just boots into runlevel 5 which could happen weeks or months later after your package blindly replaced their special sophisticated /etc/inittab when the server doesn't need a reboot for a longer time. To be on the safe side: First of all test if the content of the config file is what you expect (e.g. test if there is already a getty on ttyS0 and if yes, test if it is the right one for your package and if not don't blindly overwrite it). Only if the content is o.k., make first of all a backup (e.g. something like /etc/inittab.<your-package-name>.save) and then finally try to change it in a transaction (i.e. have all-or-nothing semmantics) so that there can never be any inconsistent content in /etc/inittab e.g. via cp -p /etc/inittab /etc/inittab.your-package-name.save \ && cp -p /etc/inittab /etc/inittab.your-package-name \ && sed -i -e '...' /etc/inittab.your-package-name \ && mv -f /etc/inittab.your-package-name /etc/inittab \ || mv -f /etc/inittab.your-package-name.save /etc/inittab Kind Regards Johannes Meixner -- SUSE LINUX Products GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany AG Nuernberg, HRB 16746, GF: Markus Rex --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org