Subject: sh script question
To: None <netbsd-help@netbsd.org>
From: Gan Uesli Starling <oinkfreebiker@att.net>
List: netbsd-help
Date: 02/20/2002 09:56:25
Howdy,

Am researching my problem with ssh-ip-tunnel. Is NOT an ssh problem. I 
found this curious item in the script /usr/pkg/sbin/vpn. See where it 
says:  <clip> if [ "x$PTY" = "x" ] </clip> that does not look right to 
me. I'm thinking maybe that little "x" in "x$PTY" does not belong? Does 
it?  The package installed it that way.

vpn_start()
{
        PEER=$1

        PTY=`$REDIR $SSH -e none -t -o 'Batchmode yes' -i $RSAKEY  \    
                   $SSHUSER  $PEER $REMOTEPPP $RPPPOPTIONS`

        echo "Issuing $REMOTEPPP $RPPPOPTIONS on $PTY"

        if [ "x$PTY" = "x" ]
        then
                echo "Failed to get a pty"
                exit 1
        fi

        $LOCALPPP $PTY $LOCALADDR:$REMOTEADDR $LPPPOPTIONS
}

Thanks,

Gan