> 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
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.
> 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
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 .
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.
> 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