opnsense-src/libexec
Cy Schubert 23ad1f4bb7 var_run: Clean up style
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.

Differnential revision:	https://reviews.freebsd.org/D47773

(cherry picked from commit ed9712f8943573136fa92a0e61c8e7c10952eeb0)
2025-03-06 16:32:53 -08:00
..
atf Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
atrun Purge more stray embedded $FreeBSD$ strings 2023-10-24 10:10:12 -07:00
blacklistd-helper Track upstream project rename in contrib/blocklistd 2024-01-07 14:31:11 -05:00
bootpd bootptest: Fix a typo in a source code comment 2025-01-29 06:56:40 +01:00
comsat comsat: move uid/gid setting earlier 2024-12-04 13:38:31 -05:00
dma dma.conf: Fix typo 2024-04-07 12:34:04 -04:00
fingerd Track upstream project rename in contrib/blocklistd 2024-01-07 14:31:11 -05:00
flua flua: Add wrappers for sys/utsname.h 2024-10-10 20:28:20 +00:00
ftpd Remove "All Rights Reserved" from FreeBSD Foundation copyrights 2024-08-06 15:39:53 -04:00
getty Purge more stray embedded $FreeBSD$ strings 2023-10-24 10:10:12 -07:00
hyperv Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
kgdb crashinfo: Print stack traces for all on-CPU threads 2024-02-09 09:55:45 -05:00
mail.local Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
makewhatis.local Remove $FreeBSD$: two-line nroff pattern 2023-08-16 11:55:10 -06:00
mknetid Purge more stray embedded $FreeBSD$ strings 2023-10-24 10:10:12 -07:00
nuageinit nuageinit: use io.popen instead of pipes in shell for password 2025-01-15 10:53:39 +01:00
phttpget Remove remnants of portsnap(8) 2024-05-09 15:52:53 +09:00
pppoed Remove $FreeBSD$: two-line nroff pattern 2023-08-16 11:55:10 -06:00
rbootd Purge more stray embedded $FreeBSD$ strings 2023-10-24 10:10:12 -07:00
rc var_run: Clean up style 2025-03-06 16:32:53 -08:00
revnetgroup Purge more stray embedded $FreeBSD$ strings 2023-10-24 10:10:12 -07:00
rpc.rquotad Remove $FreeBSD$: two-line nroff pattern 2023-08-16 11:55:10 -06:00
rpc.rstatd Purge more stray embedded $FreeBSD$ strings 2023-10-24 10:10:12 -07:00
rpc.rusersd Purge more stray embedded $FreeBSD$ strings 2023-10-24 10:10:12 -07:00
rpc.rwalld Remove $FreeBSD$: two-line nroff pattern 2023-08-16 11:55:10 -06:00
rpc.sprayd Purge more stray embedded $FreeBSD$ strings 2023-10-24 10:10:12 -07:00
rtld-elf libc/gen: split user-visible opendir()-like functions into separate source files 2025-03-04 06:19:08 +02:00
rtld-elf32 Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
save-entropy save-entropy: Add manual page 2024-05-03 17:25:24 -03:00
smrsh Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
talkd Purge more stray embedded $FreeBSD$ strings 2023-10-24 10:10:12 -07:00
tcpd tcp_wrappers: Use default C standard version 2025-01-24 14:50:38 -05:00
tests Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
tftp-proxy Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
tftpd tftpd: Address flaky tests 2024-11-19 14:15:06 +00:00
ulog-helper Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
ypxfr Remove $FreeBSD$: two-line nroff pattern 2023-08-16 11:55:10 -06:00
Makefile atf: Guard libexec/atf with WITH_TESTS_SUPPORT 2024-11-28 14:38:16 +00:00
Makefile.inc Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00