PATH_TO_INIT=$ROOTLIBDIR/systemd
BASICTOOLS="test sh bash setsid loadkeys setfont login sulogin gzip sleep echo head tail cat mount umount cryptsetup date dmsetup modprobe sed cmp tee rm true false chmod chown ln xargs"
-DEBUGTOOLS="df free ls stty ps ln ip route dmesg dhclient mkdir cp ping dhclient strace less grep id tty touch du sort hostname find"
+DEBUGTOOLS="df free ls stty ps ln ip route dmesg dhclient mkdir cp ping dhclient strace less grep id tty touch du sort hostname find vi mv"
STATEDIR="${BUILD_DIR:-.}/test/$(basename $(dirname $(realpath $0)))"
STATEFILE="$STATEDIR/.testdir"
install_debug_tools() {
[[ $DEBUGTOOLS ]] && dracut_install $DEBUGTOOLS
+
+ if [[ $INTERACTIVE_DEBUG ]]; then
+ # Set default TERM from vt220 to linux, so at least basic key shortcuts work
+ local _getty_override="$initdir/etc/systemd/system/serial-getty@.service.d"
+ mkdir -p "$_getty_override"
+ echo -e "[Service]\nEnvironment=TERM=linux" > "$_getty_override/default-TERM.conf"
+
+ cat > "$initdir/etc/motd" << EOF
+To adjust the terminal size use:
+ export COLUMNS=xx
+ export LINES=yy
+or
+ stty cols xx rows yy
+EOF
+ fi
}
install_libnss() {
mkdir -p $initdir/etc/systemd/system/testsuite.target.wants
ln -fs $TEST_BASE_DIR/testsuite.service $initdir/etc/systemd/system/testsuite.target.wants/testsuite.service
- ln -fs $TEST_BASE_DIR/end.service $initdir/etc/systemd/system/testsuite.target.wants/end.service
+ # Don't shutdown the machine after running the test when INTERACTIVE_DEBUG is set
+ [[ -z $INTERACTIVE_DEBUG ]] && ln -fs $TEST_BASE_DIR/end.service $initdir/etc/systemd/system/testsuite.target.wants/end.service
# make the testsuite the default target
ln -fs testsuite.target $initdir/etc/systemd/system/default.target