Page MenuHomeFreeBSD

var_run: Clean up style
Needs ReviewPublic

Authored by cy on Tue, Nov 26, 7:51 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Dec 3, 12:12 AM
Unknown Object (File)
Mon, Dec 2, 4:56 PM
Unknown Object (File)
Sun, Dec 1, 1:49 PM
Unknown Object (File)
Tue, Nov 26, 8:40 PM
Unknown Object (File)
Tue, Nov 26, 8: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