]> git.ipfire.org Git - people/ms/ipfire-2.x.git/commitdiff
make.sh: Only catch the error code that triggered the timer
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 10 Jul 2024 18:12:01 +0000 (18:12 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 10 Jul 2024 18:12:01 +0000 (18:12 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
make.sh

diff --git a/make.sh b/make.sh
index dfc65b485d5734db86d5b0c257af1563c281003e..69e1fd7e45b42657f8b4c9352089cc430740b6c4 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -812,16 +812,18 @@ execute() {
                                # Store the return code
                                r="$?"
 
-                               # If the return code is >= 128, wait has been interrupted by the timer
-                               if [ "${r}" -ge 128 ]; then
-                                       # Call the timer callback
-                                       if [ -n "${timer}" ]; then
-                                               "${timer}"
-                                       fi
-
-                                       # Go back and wait
-                                       continue
-                               fi
+                               case "${r}" in
+                                       # Code means that we have received SIGUSR1 from the timer
+                                       138)
+                                               # Call the timer callback
+                                               if [ -n "${timer}" ]; then
+                                                       "${timer}"
+                                               fi
+
+                                               # Go back and wait
+                                               continue
+                                               ;;
+                               esac
 
                                break
                        done