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

Fixes #10013: ncf script doesn't call properly list-compatible-inputs properly #85

Conversation

ncharles
Copy link
Member

@ncharles ncharles force-pushed the bug_10013/ncf_script_doesn_t_call_properly_list_compatible_inputs_properly branch from b5b33e3 to 524f58c Compare January 17, 2017 13:06
@ncharles
Copy link
Member Author

Commit modified

@@ -105,6 +199,21 @@ EOF

# MAIN
# Simple but enough at the moment
# Check if a server_version is defined
if [ "$1" = "-V" ]
Copy link
Member Author

Choose a reason for hiding this comment

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

i'm really not convinced by -V to define the version, but I didn't have any better idea

Copy link
Member

Choose a reason for hiding this comment

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

Not that bad

define_ncf_init() {
# If we have a Rudder 3.1, we need to use standard ncf init
is_version_valid "$RUDDER_VERSION" "3.1"
if [ $? -eq 0 ]
Copy link
Member

Choose a reason for hiding this comment

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

You can just write
if is_version_valid "$RUDDER_VERSION" "3.1"

Copy link
Member

Choose a reason for hiding this comment

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

if is_version_valid "$RUDDER_VERSION" "3.1"
then
...

NCF_VERSION="0.x"
fi
# If we have a Rudder 3.2 or 4.0, we need to use ncf of version 1
is_version_valid "$RUDDER_VERSION" "[3.2 4.0]"
Copy link
Member

Choose a reason for hiding this comment

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

We usually use the form "${VARIABLE}" for variable expansion

@@ -105,6 +199,21 @@ EOF

# MAIN
# Simple but enough at the moment
# Check if a server_version is defined
if [ "$1" = "-V" ]
Copy link
Member

Choose a reason for hiding this comment

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

Not that bad

@ncharles ncharles force-pushed the bug_10013/ncf_script_doesn_t_call_properly_list_compatible_inputs_properly branch from 524f58c to b500810 Compare January 19, 2017 08:38
@ncharles
Copy link
Member Author

Commit modified

@Normation-Quality-Assistant

OK, merging this PR

@Normation-Quality-Assistant Normation-Quality-Assistant merged commit b500810 into Normation:master Feb 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants