git.iko.soy/typeable/nixpkgs
on master help sign in
nixos/filesystems: succeed mount-pstore.service without backend
commitb3200bc9220b12ad7a8de36b24485cdb0891dad1 authorhyperfekt <git@hyperfekt.net> dateMon 26 Jul 2021, 16:04 (5 years ago) parentaf871f6
1 file changed+3−3
nixos/modules/tasks/filesystems.nix+3−3
nixos/modules/tasks/filesystems.nix+3−3
@@ -314,15 +314,15 @@ in
314314 set -eu
315315 # if the pstore module is builtin it will have mounted the persistent store automatically. it may also be already mounted for other reasons.
316316 ${pkgs.util-linux}/bin/mountpoint -q /sys/fs/pstore || ${pkgs.util-linux}/bin/mount -t pstore -o nosuid,noexec,nodev pstore /sys/fs/pstore
317− # 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.
318− TRIES=50
317+ # 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.
318+ TRIES=15
319319 while [ "$(cat /sys/module/pstore/parameters/backend)" = "(null)" ]; do
320320 if (( $TRIES )); then
321321 sleep 0.1
322322 TRIES=$((TRIES-1))
323323 else
324324 echo "Persistent Storage backend was not registered in time." >&2
325− exit 1
325+ break
326326 fi
327327 done
328328 '';