Re: Blacklisted Shell Script? --- not quite SOLVED ---
Joe Burpee <[email protected]>
| Newsgroups | gmane.user-groups.linux.ottawa.general |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Jul 03, 2009 at 15:18:06 -0400, Dave wrote: > What am I up to? http://web.ncf.ca/carpe.machinam/NCF/Static.html and > http://web.ncf.ca/carpe.machinam/NCF/sanitized-ST-585-restore.sh tell FWIW Dave I think the line 131 comment "# -- up to this point, the if-fi count is equal" is incorrect. Using grep I get 7 "if" and only 6 "fi". This might indicate a logic error. Perhaps applying some consistent indentation rules to your if/else structures could help you see where the problem lies, or at least eliminate the need for comments like line 131. I notice that the first "if" (testing running_flag) is not closed by "fi" until the end of the script, and its "else" does nothing. So if that first if-condition is false (meaning script-already-running) nothing much gets done in the whole script, which I assume is ok. But if the script is ever interrupted prematurely, running_flag will not be reset to its not-running state. If running_flag is not re-initialized externally, the script will never again do anything. Joe -- OCLUG general discussion list [email protected] http://oclug.on.ca/mailman/listinfo/oclug