Skip to content

Commit

Permalink
update ioc_check.py - fix prefix in ioccheck
Browse files Browse the repository at this point in the history
  • Loading branch information
Defenso-QTH committed Sep 22, 2024
1 parent f5c0fb4 commit 726840d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions iocage_lib/ioc_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,17 @@ def __init__(
silent=silent,
checking_datasets=True
).json_get_value("pool")
self.zpool = Pool(self.pool)
self.callback = callback
self.silent = silent

self.__check_fd_mount__()
self.__check_datasets__()

self.pool_root_dataset = Dataset(self.pool, cache=reset_cache)
self.prefix = self.pool_root_dataset.properties.get(IOCAGE_PREFIX_PROP, '')
self.iocage_dataset = Dataset(
os.path.join(self.pool, self.prefix, 'iocage'), cache=reset_cache
os.path.join(self.zpool.name, self.zpool.prefix, 'iocage'),
cache=reset_cache
)

if migrate:
Expand Down Expand Up @@ -88,9 +89,9 @@ def __check_datasets__(self):
datasets = ("iocage", "iocage/download", "iocage/images",
"iocage/jails", "iocage/log", "iocage/releases",
"iocage/templates")
if self.prefix != '':
if self.zpool.prefix != '':
datasets = (
os.path.join(self.prefix, ioc_ds) for ioc_ds in datasets
os.path.join(self.zpool.prefix, ioc_ds) for ioc_ds in datasets
)

for dataset in datasets:
Expand Down

0 comments on commit 726840d

Please sign in to comment.