mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-11-03 19:32:08 +00:00
fix(oci): the access prompt says what it grants, and two checks name what differs
This commit is contained in:
@@ -1876,7 +1876,7 @@ while IFS=$'\t' read -r TYPE TARGET SOURCE SIZE BACKUP READ_ONLY CREATE_IF_MISSI
|
||||
MOUNT_NOTES+=("$(translate "Access granted to the application on:") $SOURCE")
|
||||
else
|
||||
oci_log "Could not grant access with an ACL: $SOURCE"
|
||||
MOUNT_WARNINGS+=("$(translate "Access could not be granted; the application cannot write to:") $SOURCE")
|
||||
MOUNT_WARNINGS+=("$(translate "Access could not be granted completely; the application may be unable to write to:") $SOURCE")
|
||||
fi
|
||||
fi
|
||||
if [[ -d $SOURCE ]]; then
|
||||
|
||||
@@ -520,7 +520,9 @@ def preflight(record, candidate, config, coordinated=None):
|
||||
else:
|
||||
raise ValueError(translate('Unsupported mount type'))
|
||||
paths.append(target)
|
||||
if cfg.get('unprivileged', '0') != ('1' if unprivileged else '0') or ':' not in cfg.get('rootfs', ''):
|
||||
if cfg.get('unprivileged', '0') != ('1' if unprivileged else '0'):
|
||||
raise ValueError(translate('The privilege mode of the container does not match the saved record'))
|
||||
if ':' not in cfg.get('rootfs', ''):
|
||||
raise ValueError(translate('The container disks do not match the saved record'))
|
||||
if desired['rootfs'] != deployment['rootfs']:
|
||||
raise ValueError(translate('Changing the rootfs or its storage requires a separate migration'))
|
||||
|
||||
@@ -92,7 +92,7 @@ def check(config, deployment, vmid):
|
||||
includes = [line.split(': ',1)[1] for line in lines if line.startswith('lxc.include: ')]
|
||||
if deployment.get('host_monitor'):
|
||||
if not host_monitor_include(includes):
|
||||
raise ValueError(translate('The sysctl include is unknown or differs from the saved record'))
|
||||
raise ValueError(translate('The host monitor include is unknown or differs from the saved record'))
|
||||
return
|
||||
content = sysctl_content(deployment)
|
||||
allowed = [[str(include_path(vmid))], [str(legacy_include_path(vmid))]] if content else [[]]
|
||||
|
||||
Reference in New Issue
Block a user