From 7e92d5480fd6e922889fd98fe48c0cd10fda1829 Mon Sep 17 00:00:00 2001 From: Dominique FOURNIER Date: Thu, 2 Oct 2025 11:32:24 +0200 Subject: [PATCH] In Systemd, runlevel returns "unknown" and generate errors. Use strings (but do not detect if the system is booting) --- check | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/check b/check index 8cee8b8..0c42b24 100755 --- a/check +++ b/check @@ -18,12 +18,12 @@ fi RUNLEVEL=`runlevel | cut -f 2 -d ' '` [ "x$RUNLEVEL" == "x" ] && RUNLEVEL=0 -if [ $RUNLEVEL -eq 0 ] || [ $RUNLEVEL -eq 6 ]; then +if [ "$RUNLEVEL" == "0" ] || [ "$RUNLEVEL" == "6" ]; then echo "Arret ou reboot en cours : on sort" exit fi -if [ $RUNLEVEL -eq 1 ]; then +if [ "$RUNLEVEL" == "1" ]; then echo "Démarrage en cours : on sort" exit fi