X-Git-Url: http://git.pippins.net/embedvideo/.git/static/gitweb.js?a=blobdiff_plain;f=zfs-autosnap;h=da9090635011700f3b876e2c06e03befe417540b;hb=64e85d923d59ee7b95cb123f12bfa3750f42dc0f;hp=cfe80aaab8adb067e0cfa1615186f716ce96f548;hpb=753ccca8d8d22675da30abf49bdda584aa5878ba;p=zfs-ubuntu%2F.git diff --git a/zfs-autosnap b/zfs-autosnap index cfe80aa..da90906 100755 --- a/zfs-autosnap +++ b/zfs-autosnap @@ -50,7 +50,7 @@ filesystem=$1 mountpoint=${2-/$1} numsnapshots=${3-12} maxagedays=${4-0} -lockdir="/tmp/${filesystem}.lock" +lockdir="/tmp/zfs-admin-lock" pool=`echo "$filesystem" | awk -F '/' '{ print $1 }'` if [ -z "$filesystem" ] || [ -z "$mountpoint" ] || [ -z "$numsnapshots" ] || [ -z "$maxagedays" ]; then @@ -111,8 +111,8 @@ snapshot "${filesystem}@${datetime}" minutes=$(echo $datetime | datetime_to_minutes) -lockdir="/tmp/zfs-admin-lock" if ! mkdir "$lockdir" >/dev/null 2>&1; then + echo "-W- The zfs filesystem has been locked down. Skipping snapshot cleanup." exit 0 fi cleanup() { rm -rf "$lockdir"; }