packages: Fix service start on first boot
The *install-packages.service* unit has to be enabled, and the condition checking for `/etc/ignition/packages.installed` was inverted. Sending standard output to the console as well as the journal allows watching progress.master
parent
1cdd12454f
commit
9d941a9985
|
@ -1,17 +1,19 @@
|
|||
# vim: set ft=systemd :
|
||||
[Unit]
|
||||
Description=Install collectd
|
||||
Description=Install additional packages
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
Before=zincati.service
|
||||
Before=systemd-user-sessions.service
|
||||
ConditionPathExists=/etc/ignition/packages.d
|
||||
ConditionPathExists=/etc/ignition/packages.installed
|
||||
ConditionPathExists=!/etc/ignition/packages.installed
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/bin/sh /etc/ignition/install-packages.sh
|
||||
ExecStartPost=/bin/touch /etc/ignition/packages.installed
|
||||
StandardOutput=journal+console
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
|
@ -14,3 +14,8 @@ storage:
|
|||
mode: 0644
|
||||
contents:
|
||||
local: install-packages.service
|
||||
|
||||
systemd:
|
||||
units:
|
||||
- name: install-packages.service
|
||||
enabled: true
|
||||
|
|
Loading…
Reference in New Issue