9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: presotto@plan9.bell-labs.com
To: 9fans@cse.psu.edu
Subject: Re: [9fans] Re: your mail
Date: Tue,  1 Aug 2000 21:24:42 -0400	[thread overview]
Message-ID: <200008020125.VAA09830@cse.psu.edu> (raw)

[-- Attachment #1: Type: text/plain, Size: 2129 bytes --]

We changed the cpu protocol between editions.  The change was
to get rid of the second connection for notes.  This was a good
suggestion from Dave Mazieres at MIT.

You can convert the 2ed cpu.c to run on 3ed.  Here's the
diffs:

% diff cpu.c /sys/src/cmd/ocpu.c
21a22
> int	filter(int);
26a28
> int	fflag;
30,31c32,33
< char	*srvname = "cpu";
< char	*notesrv = "cpunote";
---
> char	*srvname = "ocpu";
> char	*notesrv = "ocpunote";
39a42
> int fdd;
50a54,56
> 	case 'f':
> 		fflag++;
> 		break;
109a116,118
> 	if(fflag)
> 		data = filter(data);
> 
124a134
> 	va_list arg;
126c136,138
< 	doprint(buf, buf+sizeof(buf), fmt, (&fmt+1));
---
> 	va_start(arg, fmt);
> 	doprint(buf, buf+sizeof(buf), fmt, arg);
> 	va_end(arg);
183a196
> 
185c198,202
< 	if(amount(fd, "/mnt/term", MREPL, "") < 0)
---
> 
> 	/* push fcall */
> 	if(fflag)
> 		fd = filter(fd);
> 	if(amount(fd, "/mnt/term", MCREATE|MREPL, "") < 0)
282a300
> 	char dir[4*NAMELEN];
285c303
< 	if((*fd = dial(na, 0, 0, 0)) < 0)
---
> 	if((*fd = dial(na, 0, dir, 0)) < 0)
288a307,308
> 	if(strstr(dir, "tcp"))
> 		fflag = 1;
318a339,366
> 
> /* Network on fd1, mount driver on fd0 */
> int
> filter(int fd)
> {
> 	int p[2];
> 
> 	if(pipe(p) < 0)
> 		fatal(1, "pipe");
> 
> 	switch(rfork(RFNOWAIT|RFPROC|RFFDG)) {
> 	case -1:
> 		fatal(1, "rfork record module");
> 	case 0:
> 		dup(fd, 1);
> 		close(fd);
> 		dup(p[0], 0);
> 		close(p[0]);
> 		close(p[1]);
> 		execl("/bin/aux/fcall", "fcall", 0);
> 		fatal(1, "exec record module");
> 	default:
> 		close(fd);
> 		close(p[0]);
> 	}
> 	return p[1];	
> }
> 

You also need to create the /rc/bin/service files on 3ed for
the 2ed ports:

% cat > /rc/bin/service/il17006 << EOF
#!/bin/rc
exec /bin/ocpu -R
EOF
% cat > /rc/bin/service/il17006 << EOF
#!/bin/ocpu -N
EOF
% cat > /rc/bin/service/tcp17005 << EOF
#!/bin/rc
exec /bin/ocpu -f -R
EOF
% cat > /rc/bin/service/tcp17006 << EOF
#!/bin/ocpu -N
EOF
% chmod +x /rc/bin/service/*1700[56]

You can then use ocpu to get back to 2ed.
I'll put these puppies in the next update.

[-- Attachment #2: Type: message/rfc822, Size: 2707 bytes --]

From: Lucio De Re <lucio@proxima.alt.za>
To: 9fans@cse.psu.edu
Subject: [9fans] Re: your mail
Date: Tue, 1 Aug 2000 16:53:42 +0200
Message-ID: <20000801165341.F4605@cackle.proxima.alt.za>

On Tue, Aug 01, 2000 at 09:37:52AM -0400, sah@borf.com wrote:
> 
> Now I need to connect to the V2 fs to transfer important files over to
> V3 so we can complete the 'upgrade.'  Attempts of 9fs to our V2 fs via a
> V3 term return "mount: mount bootes: attach -- authentication failed."
> Also, the V2 fs states "bad AuthTs num."  The passwords and usernames are
> identical on both systems.
> 
I'm running very successfully with 2ed AUTH and FS.  CPUs are somewhat
confused, and I can't quite get the 2ed AUTH to execute the mail stuff
on a 3ed CPU :-(

On the other hand, I'm not sure how a 2ed FS would handle 3ed AUTH,
which may be your problem.  Between a rock and a hard place, like me.
It may of course be merely a question of making sure AUTH and FS are
in the right type of sync, which presumably means the same password
for the FS and the AUTH uid.

I'll enable AUTH on the 3ed CPU server a little later, see what
confusion I can create.  In the meantime...

> So close I can taste it,
> 
... I think you just need a slightly longer tongue, that's all :-)

++L

             reply	other threads:[~2000-08-02  1:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-08-02  1:24 presotto [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-10-20 10:33 [9fans] porting from vs. porting to Plan 9 Douglas A. Gwyn
2003-10-21  0:10 ` [9fans] Re: your mail Roman Shaposhnick
2000-08-01 15:13 forsyth
2000-08-01 13:37 sah
2000-08-01 14:53 ` [9fans] Re: your mail Lucio De Re

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200008020125.VAA09830@cse.psu.edu \
    --to=presotto@plan9.bell-labs.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).