The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]
Article Feedback - Creating a VPN using PPTP
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Newer Topic  |  Older Topic 
 -f instead of -x
Author: Cybil 
Date:   23-07-02 13:32

Hello,
In the script for pptp, page: http://www.freebsddiary.org/pptp.php

Should "if [ -x /var/run/tun0.pid ] "
be "if [ -f /var/run/tun0.pid ] " ?
(it works fine with it...)

a+
Cyb

Reply To This Message
 
 Re: -f instead of -x
Author: Dan Langille 
Date:   23-07-02 19:07

The -f just checks to see if the file exists. The -x ensures it is executable. See man test http://www.freebsd.org/cgi/man.cgi?query=test&apropos=0&sektion=0&manpath=FreeBSD+4.6-stable&format=html.

Reply To This Message
 
 Re: -f instead of -x
Author: Cybil 
Date:   24-07-02 01:11

I don't think that /var/run/tun0.pid is executable. This file exists only while pptp is running, that's why it's better use -f( -x is not working in this case either ).

Reply To This Message
 
 Re: -f instead of -x
Author: Dan Langille 
Date:   24-07-02 16:15

Makes sense to me.

Reply To This Message
 Forum List  |  Threaded View   Newer Topic  |  Older Topic 


 Forum List  |  Need a Login? Register Here 
 User Login
 User Name:
 Password:
 Remember my login:
   
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.
How to get the most out of the forum

phorum.org