]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
refactor: change TimeoutSec=0 to TimeoutSec=infinity
authorAntonio Alvarez Feijoo <antonio.feijoo@suse.com>
Tue, 11 Nov 2025 08:27:03 +0000 (09:27 +0100)
committerLaszlo <laszlo.gombos@gmail.com>
Sat, 15 Nov 2025 12:23:50 +0000 (07:23 -0500)
The officially documented way to turn off the timeouts in systemd is setting
them to infinity, 0 is kept as historic compat support.

See https://github.com/systemd/systemd/commit/a9b837aa34a2d0bff1687427c66bed3b74cf0fed

modules.d/70dmsquash-live/checkisomd5@.service
modules.d/77dracut-systemd/rootfs-generator.sh
modules.d/80base/dracut-dev-lib.sh
modules.d/80base/module-setup.sh

index 14967c936e50d267da2fc7332eb5918bb3e584fa..1e4e4021d44de30ddd273d6460e1596fcac04c2a 100644 (file)
@@ -10,5 +10,5 @@ ExecStart=/usr/bin/checkisomd5 --verbose %f
 StandardInput=tty-force
 StandardOutput=inherit
 StandardError=inherit
-TimeoutSec=0
+TimeoutSec=infinity
 SuccessExitStatus=2
index 2c541f49e828408dbdde2a72d274cc7aad5d1219..27d0409ae751bbfea7ccec33401d4aa31215aa13 100755 (executable)
@@ -8,7 +8,7 @@ generator_wait_for_dev() {
 
     _name=$(dev_unit_name "$1")
     _timeout=$(getarg rd.timeout)
-    _timeout=${_timeout:-0}
+    _timeout=${_timeout:-infinity}
 
     if ! [ -L "$GENERATOR_DIR"/initrd.target.wants/"${_name}".device ]; then
         [ -d "$GENERATOR_DIR"/initrd.target.wants ] || mkdir -p "$GENERATOR_DIR"/initrd.target.wants
index 7ec2ddee6566d9db6efdd4c88a3644a07263a18a..b0c1beb0d120e00d1f178656f6528e3a614c45d0 100755 (executable)
@@ -69,7 +69,7 @@ set_systemd_timeout_for_dev() {
         _timeout=$(getarg rd.timeout)
     fi
 
-    _timeout=${_timeout:-0}
+    _timeout=${_timeout:-infinity}
 
     _name=$(dev_unit_name "$1")
     if ! [ -L "${PREFIX-}/etc/systemd/system/initrd.target.wants/${_name}.device" ]; then
index 6e12de1c4f4445b0158b65168d4557dd0f7e3660..3c15379889533d314077a3be10105e2887452ca8 100755 (executable)
@@ -155,7 +155,7 @@ install() {
                     _pdev=$(get_persistent_dev "$_dev")
 
                     case "$_pdev" in
-                        /dev/?*) wait_for_dev "$_pdev" 0 ;;
+                        /dev/?*) wait_for_dev "$_pdev" "infinity" ;;
                         *) ;;
                     esac
                 done
@@ -163,7 +163,7 @@ install() {
                 for _dev in "${user_devs[@]}"; do
 
                     case "$_dev" in
-                        /dev/?*) wait_for_dev "$_dev" 0 ;;
+                        /dev/?*) wait_for_dev "$_dev" "infinity" ;;
                         *) ;;
                     esac
 
@@ -171,7 +171,7 @@ install() {
                     [[ $_dev == "$_pdev" ]] && continue
 
                     case "$_pdev" in
-                        /dev/?*) wait_for_dev "$_pdev" 0 ;;
+                        /dev/?*) wait_for_dev "$_pdev" "infinity" ;;
                         *) ;;
                     esac
                 done