Page MenuHomeFreeBSD

periodic: set _localbase in periodic scripts when not set in main script
AcceptedPublic

Authored by otis on Fri, Nov 8, 1:41 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 15, 5:27 PM
Unknown Object (File)
Fri, Nov 15, 5:09 AM
Unknown Object (File)
Tue, Nov 12, 2:53 AM
Unknown Object (File)
Tue, Nov 12, 1:47 AM
Unknown Object (File)
Mon, Nov 11, 10:07 AM
Unknown Object (File)
Sun, Nov 10, 6:59 AM
Unknown Object (File)
Sat, Nov 9, 3:55 PM
Unknown Object (File)
Sat, Nov 9, 12:06 PM

Details

Reviewers
gahr
imp
Summary

Set _localalbase for usage in periodic scripts in case it has not
already been set from within periodic(8) main script.

Reported by: gahr, otis

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 60449
Build 57333: arc lint + arc unit

Event Timeline

otis requested review of this revision.Fri, Nov 8, 1:41 PM
otis created this revision.
This revision is now accepted and ready to land.Mon, Nov 11, 9:45 AM

Works for me!

However, this addition essentially is a duplication of the _localbase logic already present in /usr/sbin/periodic, which is (a) taking _localbase from sysctl and (b) providing a fall-back default just in case. As periodic(8), in some sense, implements a scripting facility similar to rc(8), my feeling is that it's more adequate to implement it along rc(8)'s lines, which is (a) setting _localbase from the sysctl in the main script /etc/rc, and (b) supplying a default for _localbase in /etc/defaults/rc.conf as fallback. Admittedly that's a bit of nitpicking to some extent.