?

Log in

No account? Create an account
Linux Community's Journal
 
[Most Recent Entries] [Calendar View] [Friends View]

Monday, May 12th, 2008

Time Event
11:58a
Ugh..
EDIT: nevermind, i'm mixing up syntaxes.. It's early..

I don't get why this error is happening... The syntax seems fine.

code:

#!/bin/bash
if [ $eoptb -gt "1" ]
then
if [ $eoptb -eq "5" ]
then
if [ $1 == "-m" ] __MEM="$2";
if [ $3 == "-m" ] __MEM="$4";
if [ $1 == "-i" ] __INO="$2";
if [ $3 == "-i" ] __INO="$4";
fi

if [ $eoptb == "3" ]
then
if [ $1 == "-m" ] __MEM="$2";
if [ $1 == "-i" ] __INO="$2";
fi

if [ ($eoptb == 3 && ($__MEM == 0 && $__INO == 0)) || ($eoptb == 5 && $__MEM == 0) || $1 == "-h" || $1 == "--help" ]
then
echo "Usage: blah blah"
exit 0
fi
fi

------

when run i get:

./test: line 10: syntax error near unexpected token `fi'
./test: line 10: ` fi'



?? It shouldn't even be processing that line, since $eoptb is not greater than one, right? Gah..
4:16p
NFS monitoring
I'd like to get an e-mail anytime an NFS mount fails, or goes stale. Anyone know a prudent way of going about doing this? Either via shell script, or other.

The simplest method I could come up with: Have a bash script watch a file on the NFS mount, without write permission, if it suddenly can't find it, an e-mail is fired off. Then, have this set to a cron job, every 10 minutes. But, there has to be a better way, with error checking and the like.

Thanks for any input.

<< Previous Day 2008/05/12
[Calendar]
Next Day >>
About LiveJournal.com