summary refs log tree commit diff
path: root/nixos/modules/tasks/filesystems.nix
diff options
context:
space:
mode:
authorhyperfekt <git@hyperfekt.net>2021-07-26 16:04:50 +0000
committerhyperfekt <git@hyperfekt.net>2021-07-26 21:02:58 +0000
commitb3200bc9220b12ad7a8de36b24485cdb0891dad1 (patch)
tree944f14245a9fb74f7f689a7d0ada8fb40d49eb92 /nixos/modules/tasks/filesystems.nix
parentaf871f619ca3ae8c162436e723241e995b088dd6 (diff)
downloadnixpkgs-b3200bc9220b12ad7a8de36b24485cdb0891dad1.tar
nixpkgs-b3200bc9220b12ad7a8de36b24485cdb0891dad1.tar.gz
nixpkgs-b3200bc9220b12ad7a8de36b24485cdb0891dad1.tar.bz2
nixpkgs-b3200bc9220b12ad7a8de36b24485cdb0891dad1.tar.lz
nixpkgs-b3200bc9220b12ad7a8de36b24485cdb0891dad1.tar.xz
nixpkgs-b3200bc9220b12ad7a8de36b24485cdb0891dad1.tar.zst
nixpkgs-b3200bc9220b12ad7a8de36b24485cdb0891dad1.zip
nixos/filesystems: succeed mount-pstore.service without backend
Diffstat (limited to 'nixos/modules/tasks/filesystems.nix')
-rw-r--r--nixos/modules/tasks/filesystems.nix6
1 files changed, 3 insertions, 3 deletions
diff --git a/nixos/modules/tasks/filesystems.nix b/nixos/modules/tasks/filesystems.nix
index 49c9a37a900..93533733aa6 100644
--- a/nixos/modules/tasks/filesystems.nix
+++ b/nixos/modules/tasks/filesystems.nix
@@ -314,15 +314,15 @@ in
               set -eu
               # if the pstore module is builtin it will have mounted the persistent store automatically. it may also be already mounted for other reasons.
               ${pkgs.util-linux}/bin/mountpoint -q /sys/fs/pstore || ${pkgs.util-linux}/bin/mount -t pstore -o nosuid,noexec,nodev pstore /sys/fs/pstore
-              # 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.
-              TRIES=50
+              # 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.
+              TRIES=15
               while [ "$(cat /sys/module/pstore/parameters/backend)" = "(null)" ]; do
                 if (( $TRIES )); then
                   sleep 0.1
                   TRIES=$((TRIES-1))
                 else
                   echo "Persistent Storage backend was not registered in time." >&2
-                  exit 1
+                  break
                 fi
               done
             '';