Files
omarchycn/install/config/wifi-powersave-rules.sh
T
Ryan Hughes 080c8ba38c omarchy-wifi-powersave: nullglob; plocate drop-in daemon-reload; idempotent legacy cleanup
- bin/omarchy-wifi-powersave: shopt -s nullglob. Previously, machines
  with no wireless interfaces ran the loop once with the literal glob
  ('iface=*'), failed iw, and exited 237. With the new always-installed
  udev rule that invokes this on every AC transition, the failure
  would surface as failed transient omarchy-wifi-powersave-* units on
  desktops. Now it cleanly no-ops.
- migrations/1779307845.sh: add 'systemctl daemon-reload' so the
  plocate-updatedb.service.d/ac-only.conf drop-in is picked up on
  upgrade. Arch's systemd pacman hook only triggers on
  /usr/lib/systemd/system/*, not /etc/systemd/system/*.
- install/config/powerprofilesctl-rules.sh and wifi-powersave-rules.sh:
  rm -f the pre-rename legacy paths before udevadm reload, so the
  cleanup is idempotent outside the one-shot migration (matters for
  re-install/downgrade testing).
2026-06-04 18:34:04 -04:00

9 lines
478 B
Bash

# The udev rule (/etc/udev/rules.d/99-omarchy-wifi-powersave.rules) ships via
# omarchy-settings. This script just reloads udev so the rule takes effect
# without waiting for a reboot.
# Also remove the pre-rename legacy path in case the old installer ran since
# the one-shot migration completed (idempotency for re-install/downgrade tests).
sudo rm -f /etc/udev/rules.d/99-wifi-powersave.rules
sudo udevadm control --reload
sudo udevadm trigger --subsystem-match=power_supply