mirror of https://github.com/jimsalterjrs/sanoid
FreeBSD sed needs a different syntax
This commit is contained in:
parent
8da79ddd2b
commit
c3e20fdefc
|
|
@ -60,7 +60,11 @@ function saveSnapshotList {
|
|||
zfs list -t snapshot -o name -Hr "${POOL_NAME}" | sort > "${RESULT}"
|
||||
|
||||
# clear the seconds for comparing
|
||||
if [ "$unamestr" == 'FreeBSD' ]; then
|
||||
sed -i '' 's/\(autosnap_[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]_[0-9][0-9]:[0-9][0-9]:\)[0-9][0-9]_/\100_/g' "${RESULT}"
|
||||
else
|
||||
sed -i 's/\(autosnap_[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]_[0-9][0-9]:[0-9][0-9]:\)[0-9][0-9]_/\100_/g' "${RESULT}"
|
||||
fi
|
||||
}
|
||||
|
||||
function verifySnapshotList {
|
||||
|
|
|
|||
Loading…
Reference in New Issue