Page MenuHomeFreeBSD

var_run: Clean up style
AbandonedPublic

Authored by cy on Nov 26 2024, 7:51 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Dec 2, 10:20 AM
Unknown Object (File)
Sun, Nov 23, 3:12 PM
Unknown Object (File)
Nov 12 2025, 7:29 AM
Unknown Object (File)
Oct 25 2025, 9:25 PM
Unknown Object (File)
Oct 25 2025, 12:45 PM
Unknown Object (File)
Oct 25 2025, 10:06 AM
Unknown Object (File)
Oct 18 2025, 2:36 PM
Unknown Object (File)
Oct 18 2025, 2:34 PM
Subscribers

Details

Summary

Clean up style and make more consistent.

Replace test with if-then-else to make the script more legible.

Replace the call to dirname with the shell %/* operator avoiding a
fork & exec.

Reorder the test for $var_run_autosave before the test for /var/run on
tmpfs. This avoids gratuitously scanning the mount table for a tmpfs
/var/run.

Initial concept by and in discussion with:

Harry Schmalzbauer <freebsd@omnilan.de>

No functional change intended.

MFC after: 2 weeks

Test Plan

Tested locally

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped