Skip to content

Commit

Permalink
don't display errors
Browse files Browse the repository at this point in the history
  • Loading branch information
johnr14 committed Feb 23, 2024
1 parent 41cbca1 commit c984764
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Wants=rpm-ostreed-deployed.timer

[Service]
Type=simple
# Do not log an error if it is not run
# Make sure your own process writes to journal for debugging it's errors
StandardError=null
ExecStartPre=/usr/bin/env bash -c 'journalctl --boot=-1 -u ostree-finalize-staged.service | grep "Finalizing staged deployment"'
#return 0 if there was a deployment and 1 if there was no deployment
ExecStart=/usr/bin/env bash -c 'echo "There was a deployment and this is the firstboot!" > /tmp/firstboot_post_deployment.txt'
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Wants=rpm-ostreed-firstboot.timer

[Service]
Type=simple
# Do not log an error if it is not run
# Make sure your own process writes to journal for debugging it's errors
StandardError=null
ExecStartPre=/usr/bin/env bash -c "journalctl --list-boots | wc -l | awk '$1>2{exit 1}"
#return 0 if there is no more than 2 lines, 1 if more than 2 lines
ExecStart=/usr/bin/env bash -c 'echo "This is the firstboot of the system !" > /tmp/firstboot_post_freshinstall.txt'

0 comments on commit c984764

Please sign in to comment.