mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-21 04:22:17 +01:00
Fix periodic setup: source repo lib first
Some checks are pending
md-naming / markdown naming convention (push) Waiting to run
Pre-commit checks / pre-commit (${{ matrix.group }}) (mypy, mypy) (push) Waiting to run
Pre-commit checks / pre-commit (${{ matrix.group }}) (pylint, pylint) (push) Waiting to run
Pre-commit checks / pre-commit (${{ matrix.group }}) (rest, ) (push) Waiting to run
Pre-commit checks / pre-commit (${{ matrix.group }}) (shellcheck, shellcheck) (push) Waiting to run
repo-contract / repo contract (push) Waiting to run
Shell tests / shell-tests (push) Waiting to run
Shell tests / lib-tests (push) Waiting to run
Shell tests / arch-tests (push) Waiting to run
Some checks are pending
md-naming / markdown naming convention (push) Waiting to run
Pre-commit checks / pre-commit (${{ matrix.group }}) (mypy, mypy) (push) Waiting to run
Pre-commit checks / pre-commit (${{ matrix.group }}) (pylint, pylint) (push) Waiting to run
Pre-commit checks / pre-commit (${{ matrix.group }}) (rest, ) (push) Waiting to run
Pre-commit checks / pre-commit (${{ matrix.group }}) (shellcheck, shellcheck) (push) Waiting to run
repo-contract / repo contract (push) Waiting to run
Shell tests / shell-tests (push) Waiting to run
Shell tests / lib-tests (push) Waiting to run
Shell tests / arch-tests (push) Waiting to run
require_extracted_repo ran before extracted_repos.sh was sourced, and the source path pointed one level too high, so the installer died at line 20 since the hosts-blocker extraction. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
fc865df4be
commit
7d5c19bf88
@ -2,10 +2,12 @@
|
|||||||
"intent": "reflector.service no longer stays in systemctl --failed after a boot where DNS comes up after network-online.target.",
|
"intent": "reflector.service no longer stays in systemctl --failed after a boot where DNS comes up after network-online.target.",
|
||||||
"scope": [
|
"scope": [
|
||||||
"linux_configuration/periodic_background/setup_periodic_system.sh",
|
"linux_configuration/periodic_background/setup_periodic_system.sh",
|
||||||
"drop-in source lives in kuhyx/system-maintenance systemd/reflector.service.d/retry-on-dns.conf"
|
"drop-in source lives in kuhyx/system-maintenance systemd/reflector.service.d/retry-on-dns.conf",
|
||||||
|
"linux_configuration/periodic_background/setup_periodic_system.sh sourced extracted_repos.sh after first use and from the wrong directory"
|
||||||
],
|
],
|
||||||
"changes": [
|
"changes": [
|
||||||
"setup_periodic_system.sh installs the reflector Restart=on-failure drop-in next to periodic-system-startup.service"
|
"setup_periodic_system.sh installs the reflector Restart=on-failure drop-in next to periodic-system-startup.service",
|
||||||
|
"source linux_configuration/lib/extracted_repos.sh before require_extracted_repo is called"
|
||||||
],
|
],
|
||||||
"verification": [
|
"verification": [
|
||||||
{
|
{
|
||||||
@ -17,6 +19,11 @@
|
|||||||
"command": "shellcheck linux_configuration/periodic_background/setup_periodic_system.sh",
|
"command": "shellcheck linux_configuration/periodic_background/setup_periodic_system.sh",
|
||||||
"result": "pass",
|
"result": "pass",
|
||||||
"evidence": "no findings"
|
"evidence": "no findings"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "sudo systemd-run --wait bash setup_periodic_system.sh",
|
||||||
|
"result": "pass",
|
||||||
|
"evidence": "red: line 20 require_extracted_repo: command not found; green: rc=0, reflector drop-in live, system-maintenance deploy.sh --check green"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"risks": [
|
"risks": [
|
||||||
|
|||||||
@ -16,6 +16,8 @@ init_setup_script "Periodic System Setup - Pacman Wrapper & Hosts File" "$@"
|
|||||||
# Get the directory where this script is located
|
# Get the directory where this script is located
|
||||||
CONFIG_DIR="$(dirname "$(dirname "$SCRIPT_DIR")")"
|
CONFIG_DIR="$(dirname "$(dirname "$SCRIPT_DIR")")"
|
||||||
|
|
||||||
|
# shellcheck source=../lib/extracted_repos.sh
|
||||||
|
source "$SCRIPT_DIR/../lib/extracted_repos.sh"
|
||||||
# Define paths
|
# Define paths
|
||||||
DW_REPO="$(require_extracted_repo digital-wellbeing "the periodic system setup")" || exit 1
|
DW_REPO="$(require_extracted_repo digital-wellbeing "the periodic system setup")" || exit 1
|
||||||
PACMAN_WRAPPER_SCRIPT="$DW_REPO/pacman/pacman_wrapper.sh"
|
PACMAN_WRAPPER_SCRIPT="$DW_REPO/pacman/pacman_wrapper.sh"
|
||||||
@ -24,8 +26,6 @@ MAKEPKG_WRAPPER_INSTALL="$DW_REPO/pacman/install_makepkg_wrapper.sh"
|
|||||||
# hosts-blocker was EXTRACTED out of this monorepo
|
# hosts-blocker was EXTRACTED out of this monorepo
|
||||||
# (github.com/kuhyx/hosts-blocker), so this path deliberately lives
|
# (github.com/kuhyx/hosts-blocker), so this path deliberately lives
|
||||||
# outside it. A missing checkout is fatal, never a silent skip.
|
# outside it. A missing checkout is fatal, never a silent skip.
|
||||||
# shellcheck source=../lib/extracted_repos.sh
|
|
||||||
source "$CONFIG_DIR/lib/extracted_repos.sh"
|
|
||||||
HOSTS_BLOCKER_DIR_RESOLVED="$(require_extracted_repo hosts-blocker "the periodic system setup")" || exit 1
|
HOSTS_BLOCKER_DIR_RESOLVED="$(require_extracted_repo hosts-blocker "the periodic system setup")" || exit 1
|
||||||
HOSTS_INSTALL_SCRIPT="$HOSTS_BLOCKER_DIR_RESOLVED/install.sh"
|
HOSTS_INSTALL_SCRIPT="$HOSTS_BLOCKER_DIR_RESOLVED/install.sh"
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user