Charles Marcus schrieb:
Hello again,
Sorry to flood the list with newbie questions... if there is a better
list for things like this, please let me know...
I'm still fairly new to linux (coming from windows world), and enjoying
the freedom, but as far as scripting goes - well, to call me a noob is
being kind...
Would any kind souls be willing to share some basic scripts that can be
used to activate a snapshot, then 'do x' (this would be my rsnapshot
command), then release the snapshot? The part that I don't have a clue
about is how to check for errors - ie, did the snapshot activate ok? Did
it release ok?...
*Usually*, a command exits with code 0 if it finishes with a success.
In bash, you can check the exit code with $? variable.
So:
lvmcommand --option1 --option2
if [ $? -eq 0 ] ; then
do_this
else
do_that
fi
_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/