Renaud Manus - RPE Approachability wrote:

> You can use svcprop(1) for that:
>
> e.g.
>     # svcadm disable -t svc:/system/cron:default
>     # svcprop -p general_ovr/enabled svc:/system/cron:default 2>/dev/null
>     false
>     # svcadm enable -t svc:/system/cron:default
>     # svcprop -p general_ovr/enabled svc:/system/cron:default 2>/dev/null
>     true
>     # svcadm enable svc:/system/cron:default
>     # svcprop -p general_ovr/enabled svc:/system/cron:default 2>/dev/null
>     #
>
> svcprop returns 'false' if the service is temporary disabled and
> 'true' if the service is temporary enabled; otherwise it returns nothing.


But wouldn't it be nice if you could do this instead:
svcdiff -s current -s running

Darren

> Gavin McNay wrote:
>
>> Is there any way to detect all the temporary changes that have been 
>> made to a system? -- I asked this at Liane's tutorial at SANE 2006
>>
>> I think I can get all the temporary disabled ones using
>>
>> svcs |grep disabled
>>
>> but this doesn';t account for the temporary enabled services though..
>>
>> The following snippet seems to do the job
>>
>> #!/bin/perl
>> open (LS_SVCS, "svcs -a|");
>> @svcs = grep {! /^lrc/ } map {/(\S+)$/} <LS_SVCS>;
>> close (LS_SVCS) ;
>> foreach my $s (@svcs) {
>>         next if($s eq 'FMRI');
>>         my $stat = `svcs -l $s`;
>>         print $stat . "\n" if($stat =~ /enabled\s*.*temporary/);
>> }
>>
>> But a more builtin way of listing the temporary changes would be 
>> desirable I think.
>>
>> Gavin
>>  
>>  
>> This message posted from opensolaris.org
>> _______________________________________________
>> smf-discuss mailing list
>> smf-discuss at opensolaris.org
>
>
>_______________________________________________
>smf-discuss mailing list
>smf-discuss at opensolaris.org
>  
>


Reply via email to