From 507ef2aa4b57b63133587c367ce37ec669db5ace Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Thu, 29 Feb 2024 23:03:28 -0300 Subject: [PATCH] Add sysdef! --- lib/bsd/control/feature.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lib/bsd/control/feature.rb b/lib/bsd/control/feature.rb index 335aed5..8db2efe 100644 --- a/lib/bsd/control/feature.rb +++ b/lib/bsd/control/feature.rb @@ -37,6 +37,21 @@ module BSD::Control set!(path, BSD::Control::Disable) end + ## + # Restore system defaults. + # + # @param [String] path + # The path to an executable. + # + # @raise [BSD::Control::Error] + # When the operation fails. + # + # @return [Boolean] + # Returns true on success. + def sysdef!(path) + set!(path, BSD::Control::SysDef) + end + ## # @group Predicates @@ -104,5 +119,6 @@ module BSD::Control end # @endgroup + private :set! end end