Page MenuHomeFreeBSD

var_run: Clean up style
AbandonedPublic

Authored by cy on Nov 26 2024, 7:51 PM.
Tags
None
Referenced Files
F125009046: D47773.diff
Sat, Aug 2, 8:45 AM
Unknown Object (File)
Tue, Jul 15, 6:29 PM
Unknown Object (File)
Sat, Jul 5, 10:38 PM
Unknown Object (File)
Jul 1 2025, 12:32 PM
Unknown Object (File)
Jun 16 2025, 11:16 PM
Unknown Object (File)
Jun 8 2025, 6:43 AM
Unknown Object (File)
Jun 7 2025, 6:48 AM
Unknown Object (File)
Jun 6 2025, 4: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