I've implemented the proposed changes. There is now no postinstall script in the spec file. The roleadd and the auth add is now provided by a SMF service in the same manner as the desktop-cache services work. The new service is: svc:/system/filesystem/zfssnap-roleadd:default and is enabled by default.
I've placed a depenendency on this service inside auto-snapshot:default so that the service will not start up without it (meaning that the role and auth both exist). I've also backported some changes to the auto-snapshot method script from Tim, that remove the dependency on /export/home/zfssnap. This allows zfssnap to have "/" as a home dir. Diffs to the source tarball and the new spec file are both attached. Thanks, Niall. Laszlo (Laca) Peter wrote: > For the record, since we already discussed this on IRC, this > patch helps with a few issues, like the location of the > home directory and also the need for adding /usr/sbin to the > PATH, however the postinstall script is still not suitable > for Solaris integration, since it tries to create the role > on the host system (where the installer is running) and not > on the target system (that is being installed/upgraded). > > It also doesn't help us on OpenSolaris where we don't have > either CASs or postinstall scripts and there are no actions > currently implemented for adding roles or auths. > > So the solution we discussed involves a CAS for adding the > auth (since this is the standard way to do that on svr4 > Solaris, and an SMF service that > > 1) checks if the auth is there and adds it if it's not > 2) creates the role > > The auto-snapshot service will depend on this one. > > Laca > > On Tue, 2008-09-23 at 13:13 +0800, Niall Power wrote: > >> I have a patch from Tim that he had asked me to review that >> should address these issues. I approved the patch but he >> hasn't pushed the changes yet. I'll apply the patch in the spec >> file, do some testing and then we can drop it once he pushes >> the patch upstream. >> >> The patch uses "/" as the user's home directory and drops the need >> to add "/usr/sbin" to the role's PATH >> >> I've attached the patch if you're interested. >> >> > > -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: zfs-auto-snapshot-01-zfssnap-role.diff URL: <http://mail.opensolaris.org/pipermail/jds-review/attachments/20080923/621284f2/attachment.ksh> -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: SUNWzfs-auto-snapshot.spec URL: <http://mail.opensolaris.org/pipermail/jds-review/attachments/20080923/621284f2/attachment-0001.ksh>
