# See the License for the specific language governing permissions and
# limitations under the License.
-
+# usage: $0 SUBVOL_MOUNTPOINT...
# if latest subvols $@ are not mounted, exit 1, print message, and touch /nocow/btrfs-stale/$subvol
[[ $EUID == 0 ]] || exec sudo -E "$BASH_SOURCE" "$@"
continue
fi
stale=true
- if btrfs sub show $d|sed '0,/^\t*Snapshot(s):/d;s/^\s*//' | \
+ if btrfs sub show $d 2>/dev/null | sed '0,/^\t*Snapshot(s):/d;s/^\s*//' | \
grep -xF btrbk/$last_snap &>/dev/null; then
stale=false
else