projects
/
zfs-nexenta
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Changed cleanup() trap to be based on INT signal instead of EXIT
[zfs-nexenta/.git]
/
zfs-replicate-wrapper
diff --git
a/zfs-replicate-wrapper
b/zfs-replicate-wrapper
index b52e64e05e3ffbb7c8fb77a88af8756013ed61e3..5e4e44a6a1a71d152cced9d70005e39e60fa2181 100755
(executable)
--- a/
zfs-replicate-wrapper
+++ b/
zfs-replicate-wrapper
@@
-24,8
+24,9
@@
cleanup() {
/usr/local/etc/bin/usb-drive-power off
echo `date` ZFS admin lock released >> $logfile
fi
/usr/local/etc/bin/usb-drive-power off
echo `date` ZFS admin lock released >> $logfile
fi
+ exit
}
}
-trap cleanup
EXI
T
+trap cleanup
IN
T
# Auto snapshot every zfs filesystem on the system specified below
echo "$date Polling for ZFS admin lock" >> $logfile
# Auto snapshot every zfs filesystem on the system specified below
echo "$date Polling for ZFS admin lock" >> $logfile
@@
-81,3
+82,6
@@
echo `date` ZFS admin lock released >> $logfile
# Parse the log file and extract our backup stats
$logfile_parser "$logfile" "$date" >> $logfile
# Parse the log file and extract our backup stats
$logfile_parser "$logfile" "$date" >> $logfile
+# clean things up and exit
+cleanup
+