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

Check if shell exists on FreeBSD #117

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 9 additions & 2 deletions providers/manage.rb
Expand Up @@ -60,11 +60,18 @@ def chef_solo_search_installed?
end

# Set home_basedir based on platform_family
home_basedir = '/home'

case node['platform_family']
when 'mac_os_x'
home_basedir = '/Users'
when 'debian', 'rhel', 'fedora', 'arch', 'suse', 'freebsd', 'openbsd', 'slackware', 'gentoo'
home_basedir = '/home'
when 'freebsd'
# Check if we need to prepend shell with /usr/local/?
if !File.exist?(u['shell']) && File.exist?("/usr/local#{u['shell']}")
u['shell'] = "/usr/local#{u['shell']}"
else
u['shell'] = '/bin/sh'
end
end

# Set home to location in data bag,
Expand Down