/etc/chiark-backup/snap/nosnap is in chiark-backup 4.3.0.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | #!/bin/sh
set -e
removes () {
if test -L "$vardir/snap-mount"; then
rm -f -- "$vardir/snap-mount"
elif test -d "$vardir/snap-mount"; then
rmdir -- "$vardir/snap-mount"
fi
rm -f -- "$vardir/snap-device"
}
vardir="$2"
case "$#.$1" in
2.drop)
removes
;;
4.snap)
removes
ln -s -- "$3" "$vardir/snap-device"
ln -s -- "$4" "$vardir/snap-mount"
;;
*)
cat >&2 <<'END'
usage: .../nosnap snap VARDIR DEV MOUNT
.../nosnap drop VARDIR
END
exit 1
;;
esac
|