From owner-freebsd-questions Tue Feb 20 22: 1:20 2001 Delivered-To: freebsd-questions@freebsd.org Received: from christel.heitec.net (christel.heitec.net [193.101.232.3]) by hub.freebsd.org (Postfix) with ESMTP id 3FD7437B491 for ; Tue, 20 Feb 2001 22:01:16 -0800 (PST) (envelope-from bdluevel@heitec.net) Received: from heitec.net (paladin.heitec.net [193.101.232.30]) by christel.heitec.net (Postfix) with ESMTP id 5D4C6B8102; Wed, 21 Feb 2001 07:01:15 +0100 (CET) Message-ID: <3A9359AB.617A067F@heitec.net> Date: Wed, 21 Feb 2001 07:01:15 +0100 From: Bernd Luevelsmeyer X-Mailer: Mozilla 4.04 [en] (WinNT; I) MIME-Version: 1.0 To: Mike Meyer Cc: questions@freebsd.org Subject: Re: shell command to make tcp connection? References: <14995.15404.696263.57091@guru.mired.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Mike Meyer wrote: > > Bernd Luevelsmeyer types: > > Ronald Klop wrote: > > > I'm looking for a programm to use in a shell script to make a tcp > > > connection. On another unix machine I ones used a programm called > > > mconnect, but I can't find it on the freebsd base system nor in the > > > ports collection. Is there something similar? If yes, what is the > > > name of the programm? > > Either use 'netcat' (port net/netcat), or use the portal filesystem > > ("options PORTAL" in the kernel script. I like the portal FS very much, > > it's such an elegant solution to have the network in the file system > > tree. > > While I agree completely about having the network in the file system > name space, my copy of LINT says: > > # NB: The NULL, PORTAL, UMAP and UNION filesystems are known to be > # buggy, and WILL panic your system if you attempt to do anything with > # them. They are included here as an incentive for some enterprising > # soul to sit down and fix them. I simply tried it, and it appears to work fine. I read the comment only after portalfs was compiled in and the first programs were running on it. Perhaps I wouldn't have tried otherwise :-) Note this only applies to portalfs; I did not try the others. Anyway, I can testify that "WILL panic your system" seems greatly exaggerated for portalfs. I'm running it (on 4.2-Stable) for months now, and didn't have a single crash. I'm not putting heavy loads on the portalfs though, simply because of a lack of applications that make use of it. Mostly I'm running some home-made shell scripts on it, grepping through /p/tcp/server/http and the like. It took me a while to figure out how to use it on the command line in pipes. The trick is to write the commands into stdin and then redirect only stdin to the portalfs, so you've still got stdout to pipe into the next command. This works in bash: ( echo "GET / HTTP/1.0" >&0 ; echo "" >&0 ; cat ) \ <> /p/tcp/server.over.there/http | grep -i something I want the unionfs, too. Because I don't trust it I'm using "mount -o union", and that seems to work fine too. It's not all the features of unionfs but for me it's good enough. I've got a big FTP area consisting of 5 disks now, one is /ftproot and the others are mounted together on /ftproot/pub . (ccd and vinum are not an option in this case because the disks must be accessible individually too.) So we've got unionfs "simulated" and portalfs "nativly". If we could now do without nullfs and umapfs, the problem seems to be solved? Hehe :-) > Have you by chance fixed the portal file system? I'm afraid I'm not proficient enough in file systems to even understand the sources. ioctls and all that makes me shudder. I'm going to look at them anyway just for fun, but don't expect fixes ;-) Have fun, Bernd To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message