Skip to content

Commit 06a66ee

Browse files
committed
ci: avoid using potentially missing xargs during emergency debugprinting
1 parent 4a12b90 commit 06a66ee

File tree

1 file changed

+4
-5
lines changed
  • features/_rescue/file.include/etc/systemd/system/emergency.service.d

1 file changed

+4
-5
lines changed

features/_rescue/file.include/etc/systemd/system/emergency.service.d/debugprint.conf

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
StandardOutput=journal+console
33
StandardError=journal+console
44
ExecStartPre=/bin/sh -c ' \
5-
systemctl --failed --no-legend --no-pager | awk "{print \$2}" | \
6-
xargs -r -I{} sh -c " \
7-
echo \"\\n=== FAILED UNIT: {} ===\\n\"; \
8-
journalctl -b -u {} --no-pager || true; \
9-
"'
5+
for unit in $(systemctl --failed --no-legend --no-pager | awk "{print \$2}"); do \
6+
echo "\n=== FAILED UNIT: $unit ===\n"; \
7+
journalctl -b -u "$unit" --no-pager || true; \
8+
done'
109
TimeoutStartSec=20s

0 commit comments

Comments
 (0)