KCMS CMM Developer's Guide

Updating the OWconfig File

Using the interactive program called OWconfig_sample, which is provided with the DDK, you can insert and remove configuration entries (class, name, and kcsLoadableModule) in the OWconfig file.

To update OWconfig file entries, you must be root. If you are not root or the /etc/openwin/server/etc path does not exist, the following error is generated:

OWconfile

file not created/updated. Check that you are root and /etc/openwin/server/etc

exists.

Start the OWconfig_sample program as follows:

example%

su example# ./OWconfig_sample

Inserting Entries

The following is an example of how to insert a configuration entry into the OWconfig file. Sample user responses are enclosed in brackets ([]).


Example 2-1 Inserting an OWconfig File Entry

ATTENTION:You must be

root to update the OWconfig file. Are you inserting an OWconfig entry? y/n 

[y]  You will be asked to supply a class, a name and a kcsLoadableModule to

create an entry such as the following: class = "SUN_Xfrm" name =

"acspdndp" kcsLoadable Module = "sunSUNWxfrmdndp.so.1"

Please see the KCMS CMM Developer's Guide for information  Enter the

profile class name in the form of XXX_IO, XXX_Prof, XXX_Prfmt, XXX_Xfrm, or

XXX_Stat. XXX is your unique cmm identifier, which must match the class name

of your derived class.  [KCS_Prof]  Enter the name of your cmm - it must match

the name in your derived class.  [dndp]  Enter the name of your dynamically

loadable module.  [kcsSUNWProfdndp.so.1]  This is your OWconfig entry. OK? y/n

 class = KCS_Prof name = dndp kcsLoadableModule = kcsSunWProfdndp.so.1  [y] 

Do you have more entries to create? y/n  [n]

The OWconfig_sample program above appends the entry to the OWconfig file.

Try inserting the entry shown in the above example:

  1. Run the OWconfig_sample program. Be sure you are root.

    See "Updating the OWconfig File".

  2. Insert the user responses shown in Example 2-1.

  3. Check for the entry at the end of the OWconfig file.

    The new configuration entry is appended to the end of the /usr/openwin/server/etc/OWconfig file. For local machine use only, the /etc/openwin/server/etc/OWconfig file is updated.

Removing Entries

The following is an example of how to remove a configuration entry from the OWconfig file. Sample user responses are enclosed in brackets ([]).


Example 2-2 Removing An OWconfig File Entry

ATTENTION:You must be

root to update the OWconfig file. Are you inserting an OWconfig entry? y/n 

[n]  To remove an OWconfig entry:  Enter the unique class name for your module

for removal from the OWconfig file. The class name would be in the form

XXX_IO, XXX_Prof, XXX_Pfrmt, or XXX_Stat  [KCS_Prof]  Enter the unique cmm

name for your module for removal from the OWconfig file.  [dndp]  This is the

OWconfig entry to remove. OK? y/n  class = KCS_Prof name = dndp  [y]  Do you

have more entries to remove? y/n  [n]

The OWconfig_sample program removes the last entry in the OWconfig file.

Try removing the entry you inserted following Example 2-1:

  1. Run the OWconfig_sample program again. Be sure you are root.

    See "Updating the OWconfig File".

  2. Fill in the user responses shown in Example 2-2.

  3. Check the OWconfig file.

    The entry should no longer appear at the end of the file.