260615.3 · 98792b1dab553d0ac9a206e40c10643d28cc57f5
*: a near complete overhaul of some fundamental components
Particularly, the `video` script and how Wingo boots. We consolidate much here and avoid separate init scripts for each machine. They were a huge pain to maintain and frequently got out of sync from one another.
We do still have some case analysis, which is annoying. But a foolish consistency is the hobgoblin of little minds.
reading declarations
Changes to system/etc/NetworkManager/dispatcher.d/50-mount-nas/run. All files
system/etc/NetworkManager/dispatcher.d/50-mount-nas/run
@@ -0,0 +1,39 @@+#!/usr/bin/env bash++target_user=andrew+target_uid="$(id -u "$target_user")"+unit=mount-nas.service+tag=NetworkManager-mount-nas++iface="${1:-}"+action="${2:-}"++case "$action" in+ up|vpn-up)+ ;;+ connectivity-change)+ # Only react when NetworkManager says connectivity is fully online.+ [ "${CONNECTIVITY_STATE:-}" = "FULL" ] || exit 0+ ;;+ *)+ exit 0+ ;;+esac++runtime_dir="/run/user/$target_uid"+bus="unix:path=$runtime_dir/bus"++if [ ! -S "$runtime_dir/bus" ]; then+ logger -t "$tag" \+ "user systemd bus not available for $target_user; not starting $unit"+ exit 0+fi++logger -t "$tag" \+ "NetworkManager action=$action iface=$iface" \+ "connection=${CONNECTION_ID:-unknown}; starting $unit"++runuser -u "$target_user" -- \+ env XDG_RUNTIME_DIR="$runtime_dir" \+ DBUS_SESSION_BUS_ADDRESS="$bus" \+ systemctl --user start --no-block "$unit"