Page MenuHomeFreeBSD

var_run: Clean up style
AbandonedPublic

Authored by cy on Nov 26 2024, 7:51 PM.
Tags
None
Referenced Files
F111311725: D47773.id147007.diff
Sun, Mar 2, 4:56 AM
Unknown Object (File)
Thu, Feb 20, 9:53 PM
Unknown Object (File)
Wed, Feb 19, 2:06 PM
Unknown Object (File)
Wed, Feb 19, 4:04 AM
Unknown Object (File)
Tue, Feb 4, 11:15 PM
Unknown Object (File)
Jan 23 2025, 3:04 PM
Unknown Object (File)
Jan 2 2025, 2:21 AM
Unknown Object (File)
Dec 31 2024, 7:11 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