Skip to content

Commit

Permalink
Use universal path in reboot tests
Browse files Browse the repository at this point in the history
The /etc directory is writable from %post also with ostree,
while /usr/libexec only on normal systems.
  • Loading branch information
VladimirSlavik committed Dec 12, 2023
1 parent af391b2 commit 5a73841
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions fragments/shared/validation/success_on_first_boot.ks
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Report success if no errors have been reported on the first boot.
# Additional tests can be implemented in /usr/libexec/kickstart-test.sh
# Additional tests can be implemented in /etc/kickstart-test.sh
# by the kickstart test that includes this fragment. This file is empty
# by default.

Expand All @@ -16,7 +16,7 @@ After=graphical.target
[Service]
Type=oneshot
ExecStart=/bin/sh /usr/libexec/kickstart-service.sh
ExecStart=/bin/sh /etc/kickstart-service.sh
[Install]
WantedBy=graphical.target
Expand All @@ -26,13 +26,13 @@ EOF
# Create a script with the actual test. Print errors to stdout.
# IMPORTANT: This file should be rewritten in tests!
touch /usr/libexec/kickstart-test.sh
touch /etc/kickstart-test.sh
# Create a script for the service
cat > /usr/libexec/kickstart-service.sh << 'EOF'
cat > /etc/kickstart-service.sh << 'EOF'
# Check error messages in the syslog.
error_messages="$(/bin/sh /usr/libexec/kickstart-test.sh)"
error_messages="$(/bin/sh /etc/kickstart-test.sh)"
if [[ ! -z "${error_messages}" ]]; then
echo "*** System has started with errors:" >> /root/RESULT
Expand Down

0 comments on commit 5a73841

Please sign in to comment.