From: Antonio Alvarez Feijoo Date: Tue, 11 Nov 2025 08:27:03 +0000 (+0100) Subject: refactor: change TimeoutSec=0 to TimeoutSec=infinity X-Git-Tag: 110~356 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c0a7100b2a8aead5cf741eb2cec6303a5285d547;p=thirdparty%2Fdracut-ng.git refactor: change TimeoutSec=0 to TimeoutSec=infinity 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 --- diff --git a/modules.d/70dmsquash-live/checkisomd5@.service b/modules.d/70dmsquash-live/checkisomd5@.service index 14967c936..1e4e4021d 100644 --- a/modules.d/70dmsquash-live/checkisomd5@.service +++ b/modules.d/70dmsquash-live/checkisomd5@.service @@ -10,5 +10,5 @@ ExecStart=/usr/bin/checkisomd5 --verbose %f StandardInput=tty-force StandardOutput=inherit StandardError=inherit -TimeoutSec=0 +TimeoutSec=infinity SuccessExitStatus=2 diff --git a/modules.d/77dracut-systemd/rootfs-generator.sh b/modules.d/77dracut-systemd/rootfs-generator.sh index 2c541f49e..27d0409ae 100755 --- a/modules.d/77dracut-systemd/rootfs-generator.sh +++ b/modules.d/77dracut-systemd/rootfs-generator.sh @@ -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 diff --git a/modules.d/80base/dracut-dev-lib.sh b/modules.d/80base/dracut-dev-lib.sh index 7ec2ddee6..b0c1beb0d 100755 --- a/modules.d/80base/dracut-dev-lib.sh +++ b/modules.d/80base/dracut-dev-lib.sh @@ -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 diff --git a/modules.d/80base/module-setup.sh b/modules.d/80base/module-setup.sh index 6e12de1c4..3c1537988 100755 --- a/modules.d/80base/module-setup.sh +++ b/modules.d/80base/module-setup.sh @@ -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