Files
finit/test/runlevel.sh
T
Joachim Wiberg 8904ca993e test: reindent
Standard Emacs shell-mode 4-space indent.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-09-18 06:38:59 +02:00

30 lines
422 B
Bash
Executable File

#!/bin/sh
# Verify selecting alternate runlevel from cmdline
set -eu
TEST_DIR=$(dirname "$0")
# shellcheck disable=SC2034
FINIT_RUNLEVEL=9
test_setup()
{
say "Test start $(date)"
}
test_teardown()
{
say "Test done $(date)"
}
# shellcheck source=/dev/null
. "$TEST_DIR/lib/setup.sh"
say 'Check runlevel'
lvl=$(run "initctl runlevel | awk '{print \$2;}'")
if [ "$lvl" -eq "9" ]; then
return 0
fi
return 1