rootfs: Add custom systemd presets
Instead of manually managing symlinks to enable units, we can define a system preset that lists which units we want disabled. Units that have in `Install` section are automatically enabled.master
parent
64e47b3b9b
commit
0528d54559
|
@ -0,0 +1,10 @@
|
||||||
|
enable htop.service
|
||||||
|
|
||||||
|
disable cups-lpd.socket
|
||||||
|
disable cups.service
|
||||||
|
disable cups.socket
|
||||||
|
disable cups.path
|
||||||
|
|
||||||
|
disable systemd-networkd.service
|
||||||
|
disable systemd-resolved.service
|
||||||
|
disable systemd-timesyncd.service
|
|
@ -17,3 +17,6 @@ ProtectKernelTunables=true
|
||||||
ProtectKernelModules=true
|
ProtectKernelModules=true
|
||||||
CapabilityBoundingSet=
|
CapabilityBoundingSet=
|
||||||
NoNewPrivileges=true
|
NoNewPrivileges=true
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
../htop.service
|
|
|
@ -1,9 +1,2 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
"${HOST_DIR}"/bin/systemctl --root="${TARGET_DIR}" disable \
|
|
||||||
cups-lpd.socket \
|
|
||||||
cups.service \
|
|
||||||
cups.socket \
|
|
||||||
systemd-networkd.service \
|
|
||||||
systemd-resolved.service \
|
|
||||||
--
|
|
||||||
|
|
Reference in New Issue