From 833919afe56d93fb0451eaee776f6e7dc3d9a2ca Mon Sep 17 00:00:00 2001 From: mdheller <21163552+mdheller@users.noreply.github.com> Date: Thu, 23 Apr 2026 21:31:23 -0400 Subject: [PATCH 1/3] workstation-v0: include Lampstand user-unit checks in doctor --- profiles/linux-dev/workstation-v0/doctor.sh | 60 +++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/profiles/linux-dev/workstation-v0/doctor.sh b/profiles/linux-dev/workstation-v0/doctor.sh index ad8fbb1..f43f3d3 100644 --- a/profiles/linux-dev/workstation-v0/doctor.sh +++ b/profiles/linux-dev/workstation-v0/doctor.sh @@ -245,6 +245,65 @@ check_lampstand_lane(){ record_result warn lampstand "missing backend" } +check_lampstand_unit(){ + local helper="$(cd "$(dirname "$0")" && pwd)/bin/check-lampstand-unit.sh" + local out unit_file enabled active + + if [[ ! -f "$helper" ]]; then + warn "Lampstand unit helper missing: $helper" + record_result warn lampstand-unit-helper "missing" + return + fi + + if ! out="$(bash "$helper" 2>/dev/null)"; then + warn "Lampstand unit helper failed" + record_result warn lampstand-unit "helper failed" + return + fi + + unit_file="$(awk -F= '$1=="unit_file" {print $2}' <<<"$out" | tail -n1)" + enabled="$(awk -F= '$1=="enabled" {print $2}' <<<"$out" | tail -n1)" + active="$(awk -F= '$1=="active" {print $2}' <<<"$out" | tail -n1)" + + if [[ "$unit_file" == "present" ]]; then + info "ok: Lampstand user unit file" + record_result ok lampstand-unit-file "present" + else + warn "Lampstand user unit file missing" + record_result warn lampstand-unit-file "missing" + fi + + case "$enabled" in + yes) + info "ok: Lampstand user unit enabled" + record_result ok lampstand-unit-enabled "yes" + ;; + no) + warn "Lampstand user unit not enabled" + record_result warn lampstand-unit-enabled "no" + ;; + *) + info "Lampstand user unit enabled state unknown" + record_result info lampstand-unit-enabled "unknown" + ;; + esac + + case "$active" in + yes) + info "ok: Lampstand user unit active" + record_result ok lampstand-unit-active "yes" + ;; + no) + warn "Lampstand user unit not active" + record_result warn lampstand-unit-active "no" + ;; + *) + info "Lampstand user unit active state unknown" + record_result info lampstand-unit-active "unknown" + ;; + esac +} + check_gsettings_equals(){ local schema=$1 local key=$2 @@ -338,6 +397,7 @@ main(){ check mc check rsync check_lampstand_lane + check_lampstand_unit if gnome_detect; then record_result info gnome "detected" From c76a27c1bdb3f535e8e05bb512315963e90c0cba Mon Sep 17 00:00:00 2001 From: mdheller <21163552+mdheller@users.noreply.github.com> Date: Thu, 23 Apr 2026 21:33:26 -0400 Subject: [PATCH 2/3] workstation-v0: include Lampstand user-unit warnings in status --- .../linux-dev/workstation-v0/bin/sourceos | 32 ++++++++++++++----- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/profiles/linux-dev/workstation-v0/bin/sourceos b/profiles/linux-dev/workstation-v0/bin/sourceos index d7625a3..29906a1 100644 --- a/profiles/linux-dev/workstation-v0/bin/sourceos +++ b/profiles/linux-dev/workstation-v0/bin/sourceos @@ -305,6 +305,29 @@ status_check_lampstand(){ WARNINGS+=("lampstand backend unavailable") } +status_check_lampstand_unit(){ + local helper="$PROFILE_DIR/bin/check-lampstand-unit.sh" + local out unit_file enabled active + + if [[ ! -f "$helper" ]]; then + WARNINGS+=("missing lampstand unit helper: $helper") + return + fi + + if ! out="$(bash "$helper" 2>/dev/null)"; then + WARNINGS+=("lampstand unit helper failed") + return + fi + + unit_file="$(awk -F= '$1=="unit_file" {print $2}' <<<"$out" | tail -n1)" + enabled="$(awk -F= '$1=="enabled" {print $2}' <<<"$out" | tail -n1)" + active="$(awk -F= '$1=="active" {print $2}' <<<"$out" | tail -n1)" + + [[ "$unit_file" == "present" ]] || WARNINGS+=("lampstand user unit file missing") + [[ "$enabled" == "yes" || "$enabled" == "unknown" ]] || WARNINGS+=("lampstand user unit not enabled") + [[ "$active" == "yes" || "$active" == "unknown" ]] || WARNINGS+=("lampstand user unit not active") +} + status_collect(){ REQUIRED_MISSING=() OPTIONAL_MISSING=() @@ -331,6 +354,7 @@ status_collect(){ fi status_check_lampstand + status_check_lampstand_unit if gnome_detect; then if ! check_bin gsettings; then @@ -612,14 +636,6 @@ main(){ exit 2 ;; esac - ;; - - *) - err "unknown command: $cmd" - usage - exit 2 - ;; - esac } main "$@" From ba636d26798831f4fa85bb584159cc641bbe5f49 Mon Sep 17 00:00:00 2001 From: mdheller <21163552+mdheller@users.noreply.github.com> Date: Thu, 23 Apr 2026 21:43:41 -0400 Subject: [PATCH 3/3] workstation-v0: repair sourceos helper dispatch tail --- profiles/linux-dev/workstation-v0/bin/sourceos | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/profiles/linux-dev/workstation-v0/bin/sourceos b/profiles/linux-dev/workstation-v0/bin/sourceos index 29906a1..65e960d 100644 --- a/profiles/linux-dev/workstation-v0/bin/sourceos +++ b/profiles/linux-dev/workstation-v0/bin/sourceos @@ -636,6 +636,14 @@ main(){ exit 2 ;; esac + ;; + + *) + err "unknown command: $cmd" + usage + exit 2 + ;; + esac } main "$@"