git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #131587 from hyperfekt/systemd-pstore

nixos/filesystems: succeed mount-pstore.service without backend

commitce080720fb4a6160407819322158db3477b332a8 authorajs124 <ajs124@users.noreply.github.com> dateTue 27 Jul 2021, 14:27 (5 years ago) parent2431a34b3200bc
1 file changed+3−3
nixos/modules/tasks/filesystems.nix+3−3
nixos/modules/tasks/filesystems.nix+3−3
@@ -333,15 +333,15 @@ in
333333 set -eu
334334 # if the pstore module is builtin it will have mounted the persistent store automatically. it may also be already mounted for other reasons.
335335 ${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.
337− TRIES=50
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=15
338338 while [ "$(cat /sys/module/pstore/parameters/backend)" = "(null)" ]; do
339339 if (( $TRIES )); then
340340 sleep 0.1
341341 TRIES=$((TRIES-1))
342342 else
343343 echo "Persistent Storage backend was not registered in time." >&2
344− exit 1
344+ break
345345 fi
346346 done
347347 '';