Shrink printer.sh to service enables only
The three /etc writes (resolved.conf.d drop-in, nsswitch.conf override, cups-browsed.conf override) now ship via omarchy-settings. The service enables stay scripted because they need chrootable_systemctl_enable to work both inside the ISO chroot and on a live system.
This commit is contained in:
@@ -1,16 +1,9 @@
|
|||||||
|
# Printer config files now ship via omarchy-settings:
|
||||||
|
# - etc/systemd/resolved.conf.d/10-disable-multicast.conf (package-owned drop-in)
|
||||||
|
# - etc/nsswitch.conf (etc-overrides, replaces the previous in-place sed)
|
||||||
|
# - etc/cups/cups-browsed.conf (etc-overrides, replaces the previous append)
|
||||||
|
#
|
||||||
|
# This script only handles service enables, which the configurator path needs.
|
||||||
chrootable_systemctl_enable cups.service
|
chrootable_systemctl_enable cups.service
|
||||||
|
|
||||||
# Disable multicast dns in resolved. Avahi will provide this for better network printer discovery
|
|
||||||
sudo mkdir -p /etc/systemd/resolved.conf.d
|
|
||||||
echo -e "[Resolve]\nMulticastDNS=no" | sudo tee /etc/systemd/resolved.conf.d/10-disable-multicast.conf
|
|
||||||
chrootable_systemctl_enable avahi-daemon.service
|
chrootable_systemctl_enable avahi-daemon.service
|
||||||
|
|
||||||
# Enable mDNS resolution for .local domains
|
|
||||||
sudo sed -i 's/^hosts:.*/hosts: mymachines mdns_minimal [NOTFOUND=return] resolve files myhostname dns/' /etc/nsswitch.conf
|
|
||||||
|
|
||||||
# Enable automatically adding remote printers
|
|
||||||
if ! grep -q '^CreateRemotePrinters Yes' /etc/cups/cups-browsed.conf; then
|
|
||||||
echo 'CreateRemotePrinters Yes' | sudo tee -a /etc/cups/cups-browsed.conf
|
|
||||||
fi
|
|
||||||
|
|
||||||
chrootable_systemctl_enable cups-browsed.service
|
chrootable_systemctl_enable cups-browsed.service
|
||||||
|
|||||||
Reference in New Issue
Block a user