On Sun, Jan 07, 2007 at 03:31:58PM +0100, Menno Lageman wrote: > I'm working on the SMF conversion of acctadm, part of which is getting > rid of /etc/init.d/acctadm and /etc/acctadm.conf by creating a transient > service and moving the configuration data into the smf(5) repository. > > Initial install would be easy since the service manifest inserts all > required properties with default values into the repository at manifest > import time. However, on upgrade I need to migrate any customizations to > /etc/accadm.conf made by the administrator. Is there a current best > practice to accomplish this? How can I access the repository during > upgrade (if at all)? My preferred option would be to migrate the > configuration in the postinstall script (having some sort of upgrade > logic in acctadm(1M) seems yucky at best). Pointers to prior art much > appreciated.
See the "DNS service manifest: write a new one, or add an instance" thread. You can't update the repository in a postinstall script on upgrade with $PKG_INSTALL_ROOT != / or "". You could handle the upgrade task in the start method of your service. Nico --