I've hit this too (status file doesn't exist and so stop_vpn fails
which means start is never run).

I added " || true" on the end of the rm.  Doing some testing here
seems to say that neither rm -f or the [ -e ... ] fix completely fix it.
I suspect we maybe racing with openvpn deleting it's status file
(after all, we did just kill it :-))

Perhaps waiting for the pid in question might be more elegant?

~$ [ -e /sdfafsdsdffasdfasdsdfafasdfd ] && rm /sdfdfssdffasdsdfa
~$ echo $?
1
~$ [ -e /sdfafsdsdffasdfasdsdfafasdfd ] && rm -f /sdfdfssdffasdsdfa
~$ echo $?
1
~$ [ -e /sdfafsdsdffasdfasdsdfafasdfd ] && rm -f /sdfdfssdffasdsdfa ||
true
~$ echo $?
0

Cheers,

Adrian
-- 
Email: [EMAIL PROTECTED]  -*-  GPG key available on public key servers
Debian GNU/Linux - the maintainable distribution   -*-  www.debian.org
Avoid working with children, animals and Microsoft "operating" systems


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to