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

Fails on OSX with fink-installed hostname #4

Closed
mrflip opened this issue Jul 21, 2009 · 1 comment
Closed

Fails on OSX with fink-installed hostname #4

mrflip opened this issue Jul 21, 2009 · 1 comment

Comments

@mrflip
Copy link

mrflip commented Jul 21, 2009

The coreutils version of hostname, installed by fink, doesn't take an '-s' flag:

coolhand$ /sw/bin/hostname --help
Usage: /sw/bin/hostname [NAME]
  or:  /sw/bin/hostname OPTION
Print or set the hostname of the current system.

      --help     display this help and exit
      --version  output version information and exit

Report bugs to <bug-coreutils@gnu.org>.

The BSD version of the command does.

I changed the last part of /usr/local/lib/ruby/gems/1.8/gems/opscode-ohai-0.1.2/lib/ohai/plugins/darwin/hostname.rb to read:

fqdn from("hostname")
begin
hostname from("hostname -s")
rescue
hostname fqdn.gsub(/..*/, "")
end

@sersut
Copy link

sersut commented May 21, 2014

Re-enabling Github Issue for this project. And cleaning the old existing issues.

Let us know if this is still an important issue for you and we can investigate this.

Thanks for the understanding.

@sersut sersut closed this as completed May 21, 2014
@chef chef locked and limited conversation to collaborators Nov 16, 2017
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants