Page MenuHomeFreeBSD

var_run: Clean up style
AbandonedPublic

Authored by cy on Nov 26 2024, 7:51 PM.
Tags
None
Referenced Files
F157529895: D47773.id147007.diff
Fri, May 22, 11:43 AM
F157524772: D47773.id.diff
Fri, May 22, 9:58 AM
Unknown Object (File)
Wed, May 20, 12:30 PM
Unknown Object (File)
Mon, May 18, 5:45 PM
Unknown Object (File)
Wed, May 13, 1:41 PM
Unknown Object (File)
Apr 14 2026, 8:10 AM
Unknown Object (File)
Apr 13 2026, 11:57 PM
Unknown Object (File)
Apr 8 2026, 9:44 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