zfs-scripts icon indicating copy to clipboard operation
zfs-scripts copied to clipboard

problem when a dataset has same name as a pool

Open mjansens opened this issue 12 years ago • 1 comments

Hi nice script. But there could be problems if you have a dataset with the same name as a pool.

so, in check_last_source_snap() last_snap_source=$( zfs list -o name -t snapshot -H 2> $0.err | grep $SRC_PATH@ | tail -1 ) should be : last_snap_source=$( zfs list -o name -t snapshot -H 2> $0.err | grep ^$SRC_PATH@ | tail -1 )

Same goes for check_last_target_snap()

Michel

mjansens avatar Nov 14 '12 11:11 mjansens

I'll take a look asap and fix it.

kattunga avatar Jan 03 '13 19:01 kattunga