installer: fix legacy unit filename mapping for migration
This commit is contained in:
parent
dcc07fb18d
commit
25ad8ab162
@ -670,13 +670,13 @@ install_config_template() {
|
||||
}
|
||||
|
||||
install_systemd_units() {
|
||||
local unit
|
||||
local source_map
|
||||
local tmp
|
||||
|
||||
for unit in service bootstrap.service update.service update.timer; do
|
||||
local modern_src="deploy/systemd/ananke.${unit}"
|
||||
local legacy_src="deploy/systemd/hecate.${unit}"
|
||||
local target="${SYSTEMD_DIR}/ananke.${unit}"
|
||||
while IFS='|' read -r target_name modern_name legacy_name; do
|
||||
local modern_src="deploy/systemd/${modern_name}"
|
||||
local legacy_src="deploy/systemd/${legacy_name}"
|
||||
local target="${SYSTEMD_DIR}/${target_name}"
|
||||
|
||||
if [[ -f "${modern_src}" ]]; then
|
||||
install -m 0644 "${modern_src}" "${target}"
|
||||
@ -691,9 +691,14 @@ install_systemd_units() {
|
||||
continue
|
||||
fi
|
||||
|
||||
echo "[install] missing both modern and legacy systemd unit sources for ananke.${unit}" >&2
|
||||
echo "[install] missing both modern and legacy systemd unit sources for ${target_name}" >&2
|
||||
return 1
|
||||
done
|
||||
done <<'EOF_UNITS'
|
||||
ananke.service|ananke.service|hecate.service
|
||||
ananke-bootstrap.service|ananke-bootstrap.service|hecate-bootstrap.service
|
||||
ananke-update.service|ananke-update.service|hecate-update.service
|
||||
ananke-update.timer|ananke-update.timer|hecate-update.timer
|
||||
EOF_UNITS
|
||||
}
|
||||
|
||||
install_self_update_script() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user