> > cat << _EOF_ | svccfg
> > repository ${PKG_INSTALL_ROOT}${REPOSITORY}
> 
> This may break if you're trying to manipulate a
> repository with
> a different version of Solaris.

What do you propose to do if the package is added to a diskless client, 
autoclient or after a JumpStart install with `pkgadd -R`?

> Why do you need to add a refresh method to the
> service?

What you are seeing here is only a small piece of the whole mosaic. I am also 
adding DNS configuration packages, which contain preconfigured named.conf 
payload, in modules. So after I add a configuration package or packages, I call 
`svcadm refresh svc:/network/dns/server:${STOCK-SYMBOL}`, which sends a SIGHUP 
to `named`. This causes `named`  to reread his configuration.

This should really be filed as an RFE for the SUNWbindr package, as the 
manifest should implement a refresh method, as described above.

> You should always use full FMRIs in scripts.  This
> will fail if another
> service has an instance named $INSTANCE.

Thank you for pointing this out. It shall be fixed.

> We discourage file dependencies because we don't
> receive notifications
> if the filesystem is mounted.  It would be better to
> check for the file
> in your start script and fail the method if it
> doesn't exist.

I'm confused. A lot of SUNW manifests have file dependencies.
If the method is failed, how will SMF know what went wrong? However, when I 
define "named.conf" as a dependency, SMF can complain that the service didn't 
start because "named.conf" is missing.

> Mmm, if this is live, then it would be better to
> modify the system
> repository (by omitting the repository command to
> svccfg) than doing
> this.

It is not yet live; it's undergoing testing and optimization right now. Again, 
how do you propose I deal with  the `pkgadd -R /export/client1` issue?

> It would be better to use "svcprop -c -p
> restarter/state" here.

If that is a viable alternative, it shall be implemented.

> >         #
> >         # Finally, refresh svc.configd.
> >         #
> >         pkill -TERM svc.configd
> 
> This should not be necessary.

It shouldn't, but it is. When I add the pgs and props from my original post, 
then end, the service instance does not show up when doing `svcadm refresh 
svc:/network/dns (or svc:/network/dns/server:${STOCK-SYMBOL} for that matter); 
svcs -a | grep dns`; but it does show up after svc.configd receives a SIGTERM 
and is consequently restarted by `svc.startd`!

Maybe a bug?

Thank you for your input so far. I'll be implementing most of your suggestions.
 
 
This message posted from opensolaris.org

Reply via email to