Commit Graph

9 Commits

Author SHA1 Message Date
Darik Horn
2e26499f6a Rebase exit codes to above 127.
Most standard shell utilities return errors less than 128. Rebase the
exit codes of this script to reduce the liklihood of overlap.
2011-11-23 10:03:56 -06:00
Darik Horn
f7ceb28963 Implement --prefix parameter checking.
Also add -p to the getopt list of short options.
2011-11-23 10:00:24 -06:00
Darik Horn
4c14da4130 Consistently quote literal strings.
Apply some syntax hygiene. Quoting everything is a safe habit because
unquoted things can have subtle side-effects.
2011-11-22 23:36:51 -06:00
Darik Horn
249e6a4cb3 Fold the main loops into a do_snapshots function.
The two primary `for` loops were identical except for the '-r' flag.
2011-11-22 23:27:24 -06:00
Darik Horn
a0a43a42af Invert the --skip-scrub test.
The $opt_skip_scrub option was tested incorrectly, which caused
the --skip-scrub option to operate opposite intent.
2011-11-22 22:09:23 -06:00
Darik Horn
d8b1730015 Add an explicit exit 0 to the end of the script.
The implicit return is "$?", which can be set non-zero by
an earlier command.
2011-11-21 21:44:37 -06:00
Darik Horn
adebbd6fee Add -q to the getopt list of short options.
This corresponds to the --quiet option.
2011-11-21 21:40:04 -06:00
Darik Horn
5bdcaad4bf Expand the options variable in the cron part file.
Cron doesn't do variable substitution and zfs-auto-snapshot doesn't
load options from its environment.
2011-11-21 20:40:24 -06:00
Darik Horn
875b55c967 Repository creation. 2011-11-21 19:47:20 -06:00