···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
336336- # 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.
337337- TRIES=50
336336+ # 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.
337337+ 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
344344- exit 1
344344+ break
345345 fi
346346 done
347347 '';