]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
TEST-04-FULL-SYSTEMD: change error reporting
authorHarald Hoyer <harald@redhat.com>
Mon, 2 Mar 2020 13:55:23 +0000 (14:55 +0100)
committerHarald Hoyer <harald@redhat.com>
Mon, 2 Mar 2020 13:55:51 +0000 (14:55 +0100)
test/TEST-04-FULL-SYSTEMD/test-init.sh

index 687522b90e08fca059cf61905140592aa4b858fa..80fecb9509d4b61a6166ed35e1066d6d8fed2dd2 100755 (executable)
@@ -110,27 +110,23 @@ ismounted() {
 
 systemctl --failed --no-legend --no-pager > /failed
 
-if ismounted /usr && [ ! -s /failed ]; then
-    echo "dracut-root-block-success" | dd oflag=direct,dsync of=/dev/sdc
-fi
-
 if ! ismounted /usr; then
     echo "**************************FAILED**************************"
     echo "/usr not mounted!!"
     cat /proc/mounts
     echo "**************************FAILED**************************"
-fi
-
-journalctl --full --no-pager -o short-monotonic
+else
+    if [ -s /failed ]; then
+        echo "**************************FAILED**************************"
+        cat /failed
+        echo "**************************FAILED**************************"
 
-if [ -s /failed ]; then
-    echo "**************************FAILED**************************"
-    cat /failed
-    echo "**************************FAILED**************************"
+    else
+        echo "dracut-root-block-success" | dd oflag=direct,dsync of=/dev/sdc
+        echo "All OK"
+    fi
 fi
 
-ls -al /run/systemd/system
-
 export TERM=linux
 export PS1='initramfs-test:\w\$ '
 [ -f /etc/mtab ] || ln -sfn /proc/mounts /etc/mtab