From owner-freebsd-hackers Mon Sep 27 9:54:52 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from bingnet2.cc.binghamton.edu (bingnet2.cc.binghamton.edu [128.226.1.18]) by hub.freebsd.org (Postfix) with ESMTP id C2FC3156A9 for ; Mon, 27 Sep 1999 09:54:44 -0700 (PDT) (envelope-from zzhang@cs.binghamton.edu) Received: from sol.cs.binghamton.edu (cs1-gw.cs.binghamton.edu [128.226.171.72]) by bingnet2.cc.binghamton.edu (8.9.3/8.9.3) with SMTP id MAA29310 for ; Mon, 27 Sep 1999 12:54:41 -0400 (EDT) Date: Mon, 27 Sep 1999 12:40:25 -0400 (EDT) From: Zhihui Zhang To: freebsd-hackers@freebsd.org Subject: Register a RPC service with inetd Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I have typed in the source code of rls (remote directory list) from the book "Power programming with RPC" and run it under FreeBSD successfully. But I can not get the rls server registered with inetd so that it can be started *automatically* during bootup. What I have done is as follows: (1) Use the -I option on rpcgen to generate inetd compatible server code: > rpcget -I rls.x (I wonder if -I is only used for SunOS) (2) Modify the file /etc/inetd.conf to contain the following line: rls/1 stream rpc/tcp nowait root /usr/libexec/rls_svc rls_svc where 1 in the version number. (3) Modify the file /etc/rpc to contain the following line: rls 20000001 where 20000001 in the program number of the rls. However, when I type "./rls host-address directory" on a client machine, it response "RPC: program not registered". I even modify the file /etc/defaults/rc.conf to set inetd_flags to be "-d" (debug). This makes sure that inetd does register rls during bootup. After bootup, the "rpcinfo -p localhost" on server also shows rls is there. Can anyone tell me what I am missing? Thanks a lot. -------------------------------------------------- Zhihui Zhang. Please visit http://www.freebsd.org -------------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message