Darren Reed writes: > For non-inetd based services, to create your own instance with > SMF you can do: > > svccfg -s network/ssh add myinst > > and you get ssh:default as well as ssh:myinst. > > Now suppose I have a telnet service that is run from inetd, its > FMRI is svc:/network/telnet:default. Presumably I could take > that and do this: > > svccfg -s network/telnet add myinst > > If I did this, would telnet:myinst also be an inetd service?
Have you considered just trying it? # svccfg -s network/telnet add myinst # svcadm enable telnet:myinst # svcs telnet STATE STIME FMRI online 8:16:02 svc:/network/telnet:default maintenance 8:17:03 svc:/network/telnet:myinst # dmesg ... Aug 1 08:17:03 s260 inetd[345]: [ID 702911 daemon.error] Failed to bind to the port of service instance svc:/network/telnet:myinst, proto tcp6: Address already in use Aug 1 08:17:03 s260 inetd[345]: [ID 702911 daemon.error] Too many bind failures for instance svc:/network/telnet:myinst, transitioning to maintenance Yes, it's an inetd service (unsurprisingly, as it inherits its restarter property from the instance), and inetd can't bind to the same port. Changing the port would certainly work. > > To go another step, if I wanted to run an extra inetd, > and created a new instance for it using the same mechanism: > > svccfg -s network/inetd add myinst > > Would I then get a new instance of rlogin, telnet, etc, to go > with inet:myinst and if so, how would these interact with the > other :myinst's that I've created? $ svcprop -p general/single_instance inetd true inetd is defined as a single_instance service right now... that property (currently unenforced, but we'll enforce it someday) means that there should never be multiple instances of inetd running. As to what will happen if you do launch multiple inetds? You'd have to try (or look at the code), but I strongly suspect it'll end in tears. Ah heck... # svccfg -s inetd add myinst # svcadm enable inetd:myinst # svcs -xv inetd:myinst svc:/network/inetd:myinst (inetd) State: maintenance since Tue Aug 01 08:19:47 2006 Reason: Start method exited with status 99. See: http://sun.com/msg/SMF-8000-KS See: man -M /usr/share/man -s 1M inetd See: /var/svc/log/network-inetd:myinst.log Impact: This service is not running. (The logfile says something silly at that point. I'm filing a bug on the silliness, but the fact that it goes into maintenance isn't silly.) Per-user inetds were requested during the S10 beta process, but code will need to be written to support it. liane -- Liane Praza, Solaris Kernel Development liane.praza at sun.com - http://blogs.sun.com/lianep