james curley wrote:
> Hi guys, new to Solaris 10.... trying to ensure that certain services have 
> been disabled, used to check inetd.conf, if it's not in there good to go, 
> other wise comment it out and HUP... 
> 
> now I understand the svcadm disable [FMRI]... but is there a way to search 
> for the FMRI of more obscure services?
> 
> For example, i want to have a command that would disable systat...  
> 
> svcadm disable systat 
> 
> how could I find this information out?
>  
>  
> This message posted from opensolaris.org
> _______________________________________________
> smf-discuss mailing list
> smf-discuss at opensolaris.org

hi james,
  'not quite sure what you're asking, but "svcs -a" will list
all the Services, event Disabled ones:

sr1-uaus-03: svcs -a | head -3
STATE          STIME    FMRI
legacy_run     May_22   lrc:/etc/rcS_d/S29wrsmcfg
legacy_run     May_22   lrc:/etc/rc2_d/S10lu



also, sometimes one knows the executable that a Service runs,
but doesn't know the Service.  I've used this to
reverse-engr the Svc name:

(eg, this finds all Svcs that reference the devfsadm command:

sr1-uaus-03: find /lib/svc/method/* | xargs -n 1 -t -i grep -i devfsadm {}
grep -i devfsadm /lib/svc/method/boot-archive
grep -i devfsadm /lib/svc/method/console-login
grep -i devfsadm /lib/svc/method/devices-local   <-------
         /usr/sbin/devfsadm >/dev/msglog 2>&1
         /usr/sbin/devfsadm -I
grep -i devfsadm /lib/svc/method/es-svc.sh
grep -i devfsadm /lib/svc/method/fc-fabric
grep -i devfsadm /lib/svc/method/fs-local
[...]

...now find the .xml ("manifest") corresponding to the
Svc method:

sr1-uaus-03: find /var/svc/manifest |grep devices-local
/var/svc/manifest/system/device/devices-local.xml

..and now look within the Manifest to find name of Svc:

# more /var/svc/manifest/system/device/devices-local.xml
<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM 
"/usr/share/lib/xml/dtd/service_bundle.dtd.1">
[...]

<service_bundle type='manifest' name='SUNWcsr:devices-system'>

<service
         name='system/device/local'     <#########################
         type='service'
[...]


...and now use svccfg to confirm that the Method file is the one
we originally found:

sr1-uaus-03: svccfg -s system/device/local
svc:/system/device/local> listprop
usr                       dependency
usr/entities              fmri     svc:/system/filesystem/usr
usr/grouping              astring  require_all
usr/restart_on            astring  none
usr/type                  astring  service
general                   framework
general/entity_stability  astring  Evolving
general/single_instance   boolean  true
startd                    framework
startd/duration           astring  transient
start                     method
start/exec                astring  /lib/svc/method/devices-local <###
[...]



...'probably a convoluted way of doing it.... but i'm new to smf also!

/andrew

Reply via email to