git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #131587 from hyperfekt/systemd-pstore
ce08072ajs124
nixos/modules/tasks/filesystems.nix+3−3
@@ -333,15 +333,15 @@ in
333 set -eu
333 set -eu
334 # if the pstore module is builtin it will have mounted the persistent store automatically. it may also be already mounted for other reasons.
334 # if the pstore module is builtin it will have mounted the persistent store automatically. it may also be already mounted for other reasons.
335 ${pkgs.util-linux}/bin/mountpoint -q /sys/fs/pstore || ${pkgs.util-linux}/bin/mount -t pstore -o nosuid,noexec,nodev pstore /sys/fs/pstore
335 ${pkgs.util-linux}/bin/mountpoint -q /sys/fs/pstore || ${pkgs.util-linux}/bin/mount -t pstore -o nosuid,noexec,nodev pstore /sys/fs/pstore
336− # wait up to five seconds (arbitrary, happened within one in testing) for the backend to be registered and the files to appear. a systemd path unit cannot detect this happening; and succeeding after a restart would not start dependent units.
336+ # wait up to 1.5 seconds for the backend to be registered and the files to appear. a systemd path unit cannot detect this happening; and succeeding after a restart would not start dependent units.
337− TRIES=50
337+ TRIES=15
338 while [ "$(cat /sys/module/pstore/parameters/backend)" = "(null)" ]; do
338 while [ "$(cat /sys/module/pstore/parameters/backend)" = "(null)" ]; do
339 if (( $TRIES )); then
339 if (( $TRIES )); then
340 sleep 0.1
340 sleep 0.1
341 TRIES=$((TRIES-1))
341 TRIES=$((TRIES-1))
342 else
342 else
343 echo "Persistent Storage backend was not registered in time." >&2
343 echo "Persistent Storage backend was not registered in time." >&2
344− exit 1
344+ break
345 fi
345 fi
346 done
346 done
347 '';
347 '';