hold on something is NOT right
This commit is contained in:
15
femctl
15
femctl
@@ -137,13 +137,16 @@ def apply_service_overlays(service):
|
|||||||
"""Fetch overlay index and apply all patches for a service"""
|
"""Fetch overlay index and apply all patches for a service"""
|
||||||
index = fetch_overlay_index()
|
index = fetch_overlay_index()
|
||||||
|
|
||||||
# optionally warn if BLFS versions mismatch
|
|
||||||
if index.get("blfs_version") != BOOTSCRIPT_VER:
|
if index.get("blfs_version") != BOOTSCRIPT_VER:
|
||||||
print("Warning: overlay BLFS version mismatch")
|
print("Warning: overlay BLFS version mismatch")
|
||||||
|
|
||||||
patches = index.get("overlays", {}).get(service, [])
|
service_entry = index.get("overlays", {}).get(service, None)
|
||||||
for patch_name in patches:
|
if not service_entry:
|
||||||
apply_remote_overlay(service, patch_name)
|
return # no overlays for this service
|
||||||
|
|
||||||
|
target = service_entry.get("target", service) # fallback to the service itself
|
||||||
|
for patch_name in service_entry.get("patches", []):
|
||||||
|
apply_remote_overlay_live(target, patch_name)
|
||||||
|
|
||||||
# ---------------------------------------------------------
|
# ---------------------------------------------------------
|
||||||
|
|
||||||
@@ -166,11 +169,9 @@ def main():
|
|||||||
return
|
return
|
||||||
service = sys.argv[2]
|
service = sys.argv[2]
|
||||||
|
|
||||||
# apply remote overlays first
|
|
||||||
apply_service_overlays(service)
|
|
||||||
|
|
||||||
if command == "enable":
|
if command == "enable":
|
||||||
run_make(service, "install", services)
|
run_make(service, "install", services)
|
||||||
|
apply_service_overlays(service)
|
||||||
elif command == "disable":
|
elif command == "disable":
|
||||||
run_make(service, "uninstall", services)
|
run_make(service, "uninstall", services)
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user