Sebastien Roy wrote:
> I used svccfg to do the following:
> 
> bash-3.2# svccfg -s network/physical:default setenv DLPI_DEVONLY 1
> 
> This resulted in:
> 
> bash-3.2# svcprop network/physical:default | grep DLPI_DEVONLY
> method_context/environment astring DLPI_DEVONLY=1
> 
> Great, and this indeed results in DLPI_DEVONLY being set in the method 
> script's environment for network/physical:default.  Now I can't undo this:
> 
> bash-3.2# svccfg -s network/physical:default unsetenv DLPI_DEVONLY
> bash-3.2# svcprop network/physical:default | grep DLPI_DEVONLY
> method_context/environment astring DLPI_DEVONLY=1
> 
> Am I missing something?  Why isn't the inverse operation working?  I've 
> tried using -i and -s (and I have no idea what those options do, I don't 
> understand the man page's descriptions for these options do) with similar 
> non-results.

Huh.

I just did:

# svccfg -s network/physical:default setenv DLPI_DEVONLY 1
# svcadm refresh network/physical:default
# svcprop network/physical:default | grep DLPI_DEVONLY
start/environment astring DLPI_DEVONLY=1

# svccfg -s network/physical:default unsetenv DLPI_DEVONLY
# svcadm refresh network/physical:default
# svcprop network/physical:default | grep DLPI_DEVONLY
#

So it seemed to work for me.  The interesting difference is that yours 
got set in method_context rather than in the start method.

It seems from the documentation (no, I didn't write this feature) that 
you must have gotten there using setenv with either the -i or -s 
options.  Thus, I'd expect that one of -i or -s will work with unsetenv.
I'm a bit shocked that it didn't.

I vaguely remember discussion of this feature in a haze of sleepless 
nights, but can't remember why we didn't just have unsetenv attempt to
be more helpful and remove the setting from method_context as well even 
if no options were specified.

An RFE might be in order.

liane

Reply via email to