Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenBSD compatibility. #91

Merged
merged 1 commit into from
Jun 4, 2015
Merged

OpenBSD compatibility. #91

merged 1 commit into from
Jun 4, 2015

Conversation

buzzdeee
Copy link
Contributor

Patch below adds support for OpenBSD.
The sudoers file is taken from a -current OpenBSD system, with just the added

includedir /etc/sudoers.d

statement.

Further changes to params.pp for OpenBSD support, mostly copied from freebsd.
The little change to package.pp was necessary, because sudo is part of the base installation, therefore no package needed to be installed.

@confiq confiq mentioned this pull request Mar 4, 2015
@@ -3,6 +3,8 @@
setcode do
if Facter::Util::Resolution.which('rpm')
sudoversion = Facter::Util::Resolution.exec('rpm -q sudo --nosignature --nodigest --qf \'%{VERSION}\'')
elsif Facter::Util::Resolution.which('sudo') and Facter::Util::Resolution.which('awk')
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you need this for OpenBSD?

@buzzdeee
Copy link
Contributor Author

buzzdeee commented Mar 4, 2015

On OpenBSD, there is no package I can query the version from. It's part of the base installation, same is true with awk. I do the Facter::Util::Resolution::which test for sudo and awk, because when someone doesn't have rpm installed, to prevent that one, to run the exec to figure out the version, and potentially throw an error.
I did not confine it to OpenBSD, because it may also work for other non RPM based hosts.

and enhance the fact about the sudo version to work on non-rpm based
systems, at least OpenBSD tested.
@buzzdeee
Copy link
Contributor Author

rebased for your convenience, build failures seem due to github failure

saz added a commit that referenced this pull request Jun 4, 2015
@saz saz merged commit 9d4cff8 into saz:master Jun 4, 2015
@saz
Copy link
Owner

saz commented Jun 4, 2015

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants