52 lines
1.6 KiB
Bash
Executable file
52 lines
1.6 KiB
Bash
Executable file
#!/bin/bash
|
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
#
|
|
# Description: reboot test system
|
|
# Author: Karel Srot <ksrot@redhat.com>
|
|
#
|
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
#
|
|
# Copyright (c) 2025 Red Hat, Inc.
|
|
#
|
|
# This copyrighted material is made available to anyone wishing
|
|
# to use, modify, copy, or redistribute it subject to the terms
|
|
# and conditions of the GNU General Public License version 2.
|
|
#
|
|
# This program is distributed in the hope that it will be
|
|
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
|
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
# PURPOSE. See the GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public
|
|
# License along with this program; if not, write to the Free
|
|
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
# Boston, MA 02110-1301, USA.
|
|
#
|
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
# Include Beaker environment
|
|
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
|
|
|
COOKIE=/var/tmp/opencryptoki-setup-system-rebooted
|
|
|
|
rlJournalStart
|
|
|
|
if [ ! -e $COOKIE ]; then
|
|
rlPhaseStartSetup "pre-reboot phase"
|
|
rlRun "uname -a"
|
|
rlRun "cat /proc/cmdline"
|
|
rlRun "touch $COOKIE"
|
|
rlLogInfo "going to reboot now..."
|
|
rlPhaseEnd
|
|
rhts-reboot
|
|
else
|
|
rlPhaseStartTest "post-reboot phase"
|
|
rlRun "uname -a"
|
|
rlRun "cat /proc/cmdline"
|
|
rlRun "uptime"
|
|
rlRun "rm -f $COOKIE"
|
|
rlPhaseEnd
|
|
fi
|
|
|
|
rlJournalPrintText
|
|
rlJournalEnd
|