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

modules.lxc.running_systemd: use command -v not which #30747

Merged
merged 1 commit into from Feb 2, 2016

Conversation

jfindlay
Copy link
Contributor

@jfindlay jfindlay added Execution-Module Platform Relates to OS, containers, platform-based utilities like FS, system based apps labels Jan 29, 2016
@cachedout
Copy link
Contributor

I am a little confused by this. At least on my system which is a built-in and command is as well, so it begs the question of why would one work and the other not. Have you tested this in the scenario outlined in the original issue?

cc: @terminalmage Do you have any additional thoughts here?

@cachedout cachedout added the Pending-Discussion The issue or pull request needs more discussion before it can be closed or merged label Feb 1, 2016
@jfindlay
Copy link
Contributor Author

jfindlay commented Feb 1, 2016

@cachedout, all I have is that based on my experience, and the referenced POSIX standard, command is more portable than which.

cachedout pushed a commit that referenced this pull request Feb 2, 2016
modules.lxc.running_systemd: use `command -v` not `which`
@cachedout cachedout merged commit 3675290 into saltstack:2015.8 Feb 2, 2016
@terminalmage
Copy link
Contributor

@cachedout command is built into bash, while which is packaged separately and is not part of the lxc rootfs image provided by the download template for LXC (which allows you to download pre-built rootfs images for various distros).

% rpm -q which
which-2.20-7.el7.x86_64
% rpm -qf /usr/bin/command
bash-4.2.46-19.el7.x86_64

@jfindlay jfindlay deleted the lxc_which branch February 19, 2016 01:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Execution-Module Pending-Discussion The issue or pull request needs more discussion before it can be closed or merged Platform Relates to OS, containers, platform-based utilities like FS, system based apps
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants