[plug] Nightly Shutdown / Backup Scripts

Mark Nold markn at enspace.com
Wed Feb 6 12:50:35 WST 2002


Sorry

I wasnt actually thinking i forgot about init... (i was using shutdown to 
change run levels... shame shame shame)

so what i wanted was

init 1
backupscript.sh
init 3

Didnt seem to work first time round but i think it was just taking time on the 
verify bit with my tar -tf on a 20Gb tape...



-----Original Message-----
From:	Brian Tombleson [SMTP:brian at paradigmit.com.au]
Sent:	Wednesday, February 06, 2002 10:46 AM
To:	plug at plug.linux.org.au
Subject:	Re: [plug] Nightly Shutdown / Backup Scripts


From: "Ben Jensz" <jensz at wn.com.au>
> To add to what Peter said, if I ran:
>
> /etc/backupscript.sh && shutdown -r now
>
> That'd shutdown the computer after the first program/script has finished.
> There is probably a cleaner way to do it (someone feel free to step in
> anytime here :P), but I'm no programmer :P

Err .. only if the backupscipt.sh returned a logical positive (not null, not
zero) (??)

I believe (but not positive about) bash efficiently handling logical
operators, so if the first argument returned a false, there is no point in
evaluating the second argument since the overall result is already
determined.

I don't remember what the default return value is, but if the above fails,
this will be one thing to check.

ICBW

- Brian.




More information about the plug mailing list