summaryrefslogtreecommitdiff
path: root/src/retain-snapshots
diff options
context:
space:
mode:
Diffstat (limited to 'src/retain-snapshots')
-rwxr-xr-xsrc/retain-snapshots7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/retain-snapshots b/src/retain-snapshots
index 9c44f05..c9d2cc6 100755
--- a/src/retain-snapshots
+++ b/src/retain-snapshots
@@ -35,7 +35,12 @@ main()
35is_readonly_subvolume() 35is_readonly_subvolume()
36{ 36{
37 [ -d "$1" ] 37 [ -d "$1" ]
38 btrfs subvolume show -- "$1" | sed -En -e'/^\tFlags:.*\breadonly\b/{q0}' -e'${q1}' 38 if
39 ! 2>/dev/null btrfs subvolume show -- "$1" |
40 sed -En -e'/^\tFlags:.*\breadonly\b/{q0}' -e'${q1}'
41 then
42 return $?
43 fi
39} 44}
40 45
41btrfs_subvolume_delete() 46btrfs_subvolume_delete()