On Di, Feb 13, 2007 at 10:33:13AM -0500, Dave Miner wrote: > Jens Elkner wrote: > >What: Add the following line to your /etc/inetd.conf: > > > >tftp dgram udp6 wait root /usr/sbin/in.tftpd in.tftpd > >-s /pool1/tftpboot > > > >Now start inetconv to create an appropriate svc manifest. On success one > >will get /var/svc/manifest/network/tftp-udp6.xml . Inspecting this file > >reveals, that inetconv failed to take over the correct tftp home directory > >parameter, i.e. it uses /tftpboot instead of /pool1/tftpboot ... > > > > I think you're expecting a bit much from inetconv; it provides a really
IMHO - exactly the opposite: Don't try to do pseudo-intelligent stuff, just convert it. > simple conversion based on the semantics of the fields in inetd.conf, in > which all that last field provides is a set of command-line arguments > specific to the service. Yes, and thus given a inetd.template inetconv should basically do not more and not less than (left out the fine tuning): cat /etc/inetd.conf | egrep -v '^[:space:]*#' | \ while read svcname endpoint proto waits suid prog firstarg args ; do if [ -n "$args" ]; then toexec="$prog $args" else toexec="$prog" fi sed -e "s, at svcname@,$svcname," \ -e "s, at endpoint@,$endpoint," \ -e "s, at proto@,$proto," \ -e "s, at waits@,$waits," \ -e "s, at suid@,$suid," \ -e "s, at toexec@,$toexec," \ /usr/lib/svc/inetd.template \ >/var/svc/manifest/network/inetd/$svcname.xml done > It's possible the service generated will > require further customization in order to function correctly, which > perhaps we should make a point of in the inetconv man page. Or add a note to inetconv output like: In case /var/svc/manifest/network/$file is not what you want, svcadm disable inetd/$svcname svccfg delete inetd/$svcname customize /var/svc/manifest/network/$file as you like and re-import with svccfg import /var/svc/manifest/network/$file > In general, it's a losing proposition for inetconv to be attempting to > divine the meaning of random service commands. Yes, and that's why it should not even try to think but just convert the appropriate lines as is and thus in a predictable manner! Regards, jens.