dns server - start/exec method

Hello,I am trying to add parameter '-d 2' to named (dns/server).Can you advice me what is the best way to do that ?Regardsprzemol
[166 byte] By [przemolb] at [2007-11-26 8:50:03]
# 1
Which version of Solaris are you running?
hspaans at 2007-7-6 22:40:23 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 2

> Which version of Solaris are you running?

Of course Solaris 10 :-). The problem is that named is under SMF

so to run it with different parameters I need to do some modification in SMF. I was looking for start/exec method but it seems it doesn't exist. At least I cannot find it. DO I have to create it ?

przemol

przemolb at 2007-7-6 22:40:23 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 3

Try this:

svccfg -s dns/server:default setprop start/exec = "/usr/sbin/named -d 2"

Note that the start method property group is defined on the instance, not the dns/server

service. I'm not sure why this was done, but as a result the method won't be shared by

other instances.

David_Bustos at 2007-7-6 22:40:23 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 4

> Try this:

>

> > svccfg -s dns/server:default setprop start/exec =

> "/usr/sbin/named -d 2"

>

bash-3.00# svccfg -s dns/server:default setprop start/exec = "/usr/sbin/named -d 2"

svccfg: Syntax error.

bash-3.00# svccfg -s dns/server

svc:/network/dns/server> setprop start/exec = "/usr/sbin/named -d 2"

No such property group "start".

svc:/network/dns/server> help

General commands: help set repository end

Manifest commands: inventory validate import export archive

Profile commands: apply extract

Entity commands: list select unselect add delete

Snapshot commands: listsnap selectsnap revert

Property group commands: listpg addpg delpg

Property commands: listprop setprop delprop editprop

Property value commands: addpropvalue delpropvalue setenv unsetenv

svc:/network/dns/server> addpg

Usage: addpg name type [P]

Add a new property group to the currently selected entity.

svc:/network/dns/server> addpg start ?

What should I use as a 'type' ?

przemol

przemolb at 2007-7-6 22:40:23 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 5

Sorry, I forgot to quote my quotes. Try

svccfg -s dns/server:default setprop start/exec = \"/usr/sbin/named -d 2\"

Note that it doesn't work on network/dns/server because you need to select the instance,

network/dns/server:default .

David_Bustos at 2007-7-6 22:40:23 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 6

Another (maybe easier to remember) approach is using svccfg's interactive mode. So after you started it simply use:

magi:/home/peter $ svccfg

svc:> select dns/server:default

svc:/network/dns/server:default>

...after which you can use "listprop" to see all entries and "editprop" to edit them. This can be easier on you since you can edit and change multiple entries at once.

LionO at 2007-7-6 22:40:23 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 7

> Sorry, I forgot to quote my quotes. Try

>

> > svccfg -s dns/server:default setprop start/exec =

> \"/usr/sbin/named -d 2\"

>

>

> Note that it doesn't work on network/dns/server

> because you need to select the instance,

> network/dns/server:default .

Yes. That's working:

# svccfg -s dns/server:default setprop start/exec = \"/usr/sbin/named -d 3\"

# svcadm refresh dns/server

# svcadm restart dns/server

# pgrep -fl named

10211 /usr/sbin/named -d 3

Thanks !

przemol

przemolb at 2007-7-6 22:40:23 > top of Java-index,Solaris Operating System,Solaris 10 Features...