fix(switcher): pass 'rooted' not 'root' when switching to rootless

The switch-to-rootless branch passed the literal 'root' to mode-aware
helpers whose vocabulary is 'rooted'/'rootless' (matching
CFG_DOCKER_INSTALL_TYPE). Two were real no-ops: dockerComposeDownAllApps
root never matched dockerComposeDown's 'rooted' check (old rooted apps were
never composed-down before the switch), and dockerServiceStop root never
matched dockerServiceStop's 'rooted' check (the old rooted docker service
was never stopped/disabled). dockerServiceStart root was harmless only
because that function ignores its arg and reads CFG. Both no-ops were
silent until dockerComposeDown started reporting unknown modes. Align all
three to 'rooted'.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: librelad <librelad@digitalangels.vip>
This commit is contained in:
librelad 2026-05-24 13:17:00 +01:00
parent 0faff182f8
commit a7542fe716

View File

@ -60,7 +60,7 @@ dockerSwitcherSwap()
if [[ $docker_root_found == "false" ]]; then
installDocker;
fi
dockerServiceStart root;
dockerServiceStart rooted;
dockerSwitcherUpdateContainersToDockerType;
reconcileDockerOwnership "$CFG_DOCKER_INSTALL_TYPE";
dockerStartAllApps;
@ -89,8 +89,8 @@ dockerSwitcherSwap()
isNotice "Switching to the Rootless Docker now..."
# Looking at the Rooted Install
if [[ $docker_rooted_found == "true" ]]; then
dockerComposeDownAllApps root;
dockerServiceStop root;
dockerComposeDownAllApps rooted;
dockerServiceStop rooted;
fi
dockerServiceStart rootless;
dockerSwitcherUpdateContainersToDockerType;