-
Notifications
You must be signed in to change notification settings - Fork 276
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
Allow pamtest.py to work for older versions #7267
Conversation
1) detect if PAM is available and use that, else use the more modern python3-python-pam 2) if SLE15 run pamtest.py with python3 otherwise run with python2 Signed-off-by: Noel Power <noel.power@suse.com>
thanks! |
if [ ! -f /etc/os-release ]; then | ||
return 1 | ||
fi | ||
if (grep -i -q "SUSE Linux Enterprise Server 15" /etc/os-release); then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not source and use $VERSION_ID variable instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
simply ease of implementation, there are probably many different ways to detect the version, I saw elsewhere code doing this
isSles15(){
if [ ! -f /etc/os-release ]; then
return 1
fi
. /etc/os-release
if [[ "$VERSION_ID" == "15"* ]]; then
return 0
fi
return 1
}
should work too, I actually prefer the simple grep (but I am not in anyway comfortable writing sh scripts :-)) Please let me know if you wish me to update with the change above or if the orig code is ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't worry @noelpower :), was more out of curiosity :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks alot!!
https://openqa.suse.de/tests/2812575#step/sssd/20 shows the fix is working, but failed at my @scenario_list; |
Please see https://bugzilla.suse.com/show_bug.cgi?id=1131989#c11 for more info.
This patch:
more modern python3-python-pam
Signed-off-by: Noel Power noel.power@suse.com