Page MenuHomeFreeBSD

periodic.conf: remove long deprecated security_daily_compat_var()
ClosedPublic

Authored by michaelo on Apr 15 2024, 11:07 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Dec 24, 3:42 AM
Unknown Object (File)
Fri, Dec 13, 4:32 PM
Unknown Object (File)
Fri, Dec 13, 8:30 AM
Unknown Object (File)
Nov 25 2024, 3:23 PM
Unknown Object (File)
Nov 24 2024, 7:55 PM
Unknown Object (File)
Nov 22 2024, 1:13 PM
Unknown Object (File)
Nov 21 2024, 6:40 AM
Unknown Object (File)
Nov 19 2024, 11:32 PM
Subscribers

Details

Summary

This function is documented to be gone in after 11. Time to remove this
compat shim.

PR: 275296
Approved by: jrm (mentor), otis (mentor)
MFC after: 1 month

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Adding cy@ as he might also want have a look (as it's src component).

The message in periodic.conf is clear.

	# Compatibility with old daily variable names.
	# They can be removed in stable/11.
	security_daily_compat_var() {
		local var=$1 dailyvar value

		dailyvar=daily_status_security${var#security_status}
		periodvar=${var%enable}period
		eval value=\"\$$dailyvar\"
		[ -z "$value" ] && return
		echo "Warning: Variable \$$dailyvar is deprecated," \
		    "use \$$var instead." >&2
		case "$value" in
		[Yy][Ee][Ss])
			eval $var=YES
			eval $periodvar=daily
			;;
		*)
			eval $var=\"$value\"
			;;
		esac
	}
This revision is now accepted and ready to land.Apr 29 2024, 5:17 PM