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
StandardInput=tty-force
StandardOutput=inherit
StandardError=inherit
-TimeoutSec=0
+TimeoutSec=infinity
SuccessExitStatus=2
_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
_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
_pdev=$(get_persistent_dev "$_dev")
case "$_pdev" in
- /dev/?*) wait_for_dev "$_pdev" 0 ;;
+ /dev/?*) wait_for_dev "$_pdev" "infinity" ;;
*) ;;
esac
done
for _dev in "${user_devs[@]}"; do
case "$_dev" in
- /dev/?*) wait_for_dev "$_dev" 0 ;;
+ /dev/?*) wait_for_dev "$_dev" "infinity" ;;
*) ;;
esac
[[ $_dev == "$_pdev" ]] && continue
case "$_pdev" in
- /dev/?*) wait_for_dev "$_pdev" 0 ;;
+ /dev/?*) wait_for_dev "$_pdev" "infinity" ;;
*) ;;
esac
done