From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: Date: Mon, 20 Oct 2008 14:48:00 +0200 From: "Rudolf Sykora" To: "Fans of the OS Plan 9 from Bell Labs" <9fans@9fans.net> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_10454_24808918.1224506880052" Subject: [9fans] mount followed by srvfs needs a sleep? Topicbox-Message-UUID: 217698fc-ead4-11e9-9d60-3106f5b1d025 ------=_Part_10454_24808918.1224506880052 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello, I have this function in my lib/profile: fn penelopa{ srv penelopa.karlov.mff.cuni.cz penelopa #to solve the authentication --- see the text bellow mount /srv/penelopa $home/shared/penelopa unmount $home/shared/penelopa local mount /srv/penelopa $home/shared/penelopa #sleep 1 # --- see the text bellow; this pertains to my main question local srvfs CALC $home/shared/penelopa/home/ruda/CPA-CALC #**** local mount /srv/CALC $home/shared/CALC } where local is this script: #!/bin/rc plumb 'Local ' ^ $"* (simply, the commands prepended with 'local' are to be executed by the rc of the plumber). And it doesn't work, the #**** command complaining: not OK (63): chdir(44:"/usr/ruda/shared/penelopa/home/ruda/CPA-CALC"): '/usr followed by a naural complaint from the last command: mount: can't open /srv/CALC: '/srv/CALC' file does not exist However, adding the 'sleep 1' at the shown place remedies the situation and everything suddenly works alright. Can anybody say a word about this? Note: /srv/penelopa is a filesystem on a remote linux-running machine. Also note: this is all about having 'global namespace' --- mounting in some window, seeing everywhere; I have these further instructions in the 'case terminal' part of my 'profile': mntgen $home/shared; srvfs shared $home/shared; plumber; rfork n; mount -c /srv/shared $home/shared; exec rio -i riostart. But this is hopefully only to complete the picture. I hope this is irrelevant as far as my question is concerned... Thanks Ruda PS.: also a related little question: When connecting to a remote machine with a 'srv' command follow by a 'mount' command, the execution of the 'mount' results in a request for entering a username&password. This happens only during the first login attempt. After that no further authentication is required. Now. I somehow use this fact to be able to log in. I first run mount followed by unmount. This requires the login&password. Only then I execute my 'local mount ...' command. If I executed this right away (without mount & unmount) I would end in a situation when the plumber shell needs to talk to me. But this shell writes to the /dev/kprint... What is the better way? (and, actually, is this kind of authentication any safe?) ------=_Part_10454_24808918.1224506880052 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
Hello,

I have this function in my lib/profile:
    fn penelopa{
        srv penelopa.karlov.mff.cuni.cz penelopa

        #to solve the authentication --- see the text bellow
        mount /srv/penelopa $home/shared/penelopa
        unmount $home/shared/penelopa

        local mount /srv/penelopa $home/shared/penelopa
        #sleep 1  # --- see the text bellow; this pertains to my main question
        local srvfs CALC $home/shared/penelopa/home/ruda/CPA-CALC  #****
        local mount /srv/CALC $home/shared/CALC
    }

where local is this script:
    #!/bin/rc
    plumb 'Local ' ^ $"*

(simply, the commands prepended with 'local' are to be executed by the rc of the plumber).
And it doesn't work, the #**** command complaining:

    not OK (63): chdir(44:"/usr/ruda/shared/penelopa/home/ruda/CPA-CALC"): '/usr

followed by a naural complaint from the last command:

    mount: can't open /srv/CALC: '/srv/CALC' file does not exist

However, adding the 'sleep 1' at the shown place remedies the situation and everything suddenly works alright. Can anybody say a word about this?

Note: /srv/penelopa is a filesystem on a remote linux-running machine.
Also note: this is all about having 'global namespace' --- mounting in some window, seeing everywhere; I have these further instructions in the 'case terminal' part of my 'profile': mntgen $home/shared; srvfs shared $home/shared; plumber; rfork n; mount -c /srv/shared $home/shared; exec rio -i riostart. But this is hopefully only to complete the picture. I hope this is irrelevant as far as my question is concerned...

Thanks
Ruda

PS.: also a related little question:
When connecting to a remote machine with a 'srv' command follow by a 'mount' command, the execution of the 'mount' results in a request for entering a username&password. This happens only during the first login attempt. After that no further authentication is required. Now. I somehow use this fact to be able to log in. I first run mount followed by unmount. This requires the login&password. Only then I execute my 'local mount ...' command. If I executed this right away (without mount & unmount) I would end in a situation when the plumber shell needs to talk to me. But this shell writes to the /dev/kprint...
What is the better way?
(and, actually, is this kind of authentication any safe?)
------=_Part_10454_24808918.1224506880052--