@@ -65,8 +65,8 @@ def post_init(self, custom_args):
6565 self .custom_args = {}
6666 if 'root_label' not in self .custom_args :
6767 self .custom_args ['root_label' ] = 'ROOT'
68- if 'root_is_snapshot ' not in self .custom_args :
69- self .custom_args ['root_is_snapshot ' ] = False
68+ if 'root_is_snapper_snapshot ' not in self .custom_args :
69+ self .custom_args ['root_is_snapper_snapshot ' ] = False
7070 if 'btrfs_default_volume_requested' not in self .custom_args :
7171 self .custom_args ['btrfs_default_volume_requested' ] = True
7272 if 'root_is_readonly_snapshot' not in self .custom_args :
@@ -86,11 +86,11 @@ def post_init(self, custom_args):
8686 self .root_volume_name = volume .name
8787 self .default_volume_name = self .root_volume_name
8888
89- if self .custom_args ['root_is_snapshot ' ] and \
89+ if self .custom_args ['root_is_snapper_snapshot ' ] and \
9090 self .root_volume_name == '/' :
91- log .warning ('root_is_snapshot requires a toplevel sub-volume' )
92- log .warning ('root_is_snapshot has been disabled' )
93- self .custom_args ['root_is_snapshot ' ] = False
91+ log .warning ('root_is_snapper_snapshot requires a toplevel sub-volume' )
92+ log .warning ('root_is_snapper_snapshot has been disabled' )
93+ self .custom_args ['root_is_snapper_snapshot ' ] = False
9494
9595 self .subvol_mount_list = []
9696 self .toplevel_mount = None
@@ -134,7 +134,7 @@ def setup(self, name=None):
134134 Command .run (
135135 ['btrfs' , 'subvolume' , 'create' , root_volume ]
136136 )
137- if self .custom_args ['root_is_snapshot ' ]:
137+ if self .custom_args ['root_is_snapper_snapshot ' ]:
138138 snapshot_volume = self .mountpoint + \
139139 f'/{ self .root_volume_name } /.snapshots'
140140 Command .run (
@@ -233,7 +233,8 @@ def create_volumes(self, filesystem_name):
233233 )
234234
235235 volume_mountpoint = toplevel
236- root_is_snapshot = self .custom_args ['root_is_snapshot' ]
236+ root_is_snapper_snapshot = \
237+ self .custom_args ['root_is_snapper_snapshot' ]
237238
238239 attributes = {
239240 'parent' : volume .parent or '' ,
@@ -244,7 +245,7 @@ def create_volumes(self, filesystem_name):
244245 ).lstrip (os .sep ),
245246 'subvol_name' : volume .name
246247 }
247- if root_is_snapshot :
248+ if root_is_snapper_snapshot :
248249 volume_mountpoint = self .mountpoint + \
249250 f'/{ self .root_volume_name } /.snapshots/1/snapshot/'
250251 attributes = {
@@ -263,7 +264,7 @@ def create_volumes(self, filesystem_name):
263264 os .sep .join (
264265 [
265266 volume_mountpoint ,
266- self .root_volume_name if not root_is_snapshot else '' ,
267+ self .root_volume_name if not root_is_snapper_snapshot else '' ,
267268 volume .realpath
268269 ]
269270 )
@@ -397,7 +398,7 @@ def get_mountpoint(self) -> str:
397398 sync_target : List [str ] = [self .mountpoint ]
398399 if self .root_volume_name != '/' :
399400 sync_target .append (self .root_volume_name )
400- if self .custom_args .get ('root_is_snapshot ' ):
401+ if self .custom_args .get ('root_is_snapper_snapshot ' ):
401402 sync_target .extend (['.snapshots' , '1' , 'snapshot' ])
402403 return os .path .join (* sync_target )
403404
@@ -412,7 +413,7 @@ def sync_data(self, exclude=None):
412413 """
413414 if self .toplevel_mount :
414415 sync_target = self .get_mountpoint ()
415- if self .custom_args ['root_is_snapshot ' ]:
416+ if self .custom_args ['root_is_snapper_snapshot ' ]:
416417 self ._create_snapshot_info (
417418 '' .join (
418419 [
@@ -426,18 +427,18 @@ def sync_data(self, exclude=None):
426427 options = Defaults .get_sync_options (), exclude = exclude
427428 )
428429 if self .custom_args ['quota_groups' ] and \
429- self .custom_args ['root_is_snapshot ' ]:
430+ self .custom_args ['root_is_snapper_snapshot ' ]:
430431 self ._create_snapper_quota_configuration ()
431432
432433 def set_property_readonly_root (self ):
433434 """
434435 Sets the root volume to be a readonly filesystem
435436 """
436- root_is_snapshot = \
437- self .custom_args ['root_is_snapshot ' ]
437+ root_is_snapper_snapshot = \
438+ self .custom_args ['root_is_snapper_snapshot ' ]
438439 root_is_readonly_snapshot = \
439440 self .custom_args ['root_is_readonly_snapshot' ]
440- if root_is_snapshot and root_is_readonly_snapshot :
441+ if root_is_snapper_snapshot and root_is_readonly_snapshot :
441442 sync_target = self .get_mountpoint ()
442443 Command .run (
443444 ['btrfs' , 'property' , 'set' , sync_target , 'ro' , 'true' ]
0 commit comments