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)
Sat, Oct 18, 2:36 PM
Unknown Object (File)
Sat, Oct 18, 2:34 PM
Unknown Object (File)
Tue, Oct 14, 11:08 PM
Unknown Object (File)
Tue, Oct 14, 8:11 PM
Unknown Object (File)
Thu, Oct 9, 5:34 AM
Unknown Object (File)
Sat, Sep 27, 3:55 PM
Unknown Object (File)
Sep 17 2025, 3:40 PM
Unknown Object (File)
Sep 16 2025, 9:51 AM
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