Skip to content
This repository has been archived by the owner on Dec 7, 2022. It is now read-only.

Commit

Permalink
Fixes relabel.sh to handle empty string being passed in.
Browse files Browse the repository at this point in the history
The new version comparison mechanism no longer handled an empty string being passed in.
As a result none of the restorecon statements were getting run at the end of pulp-selinux
installation.

closes #2436
https://pulp.plan.io/issues/2436
  • Loading branch information
dkliban committed Nov 23, 2016
1 parent 454f099 commit 44e13b1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions server/selinux/server/relabel.sh
Expand Up @@ -6,6 +6,12 @@ function version_less_than () {
[[ $(echo -e $1'\n'$2|sort -V|head -n 1) != $2 ]]
}

# Set the previous version to 0.0 if one is not passed in
if [ -z $1 ]
then
set -- "0.0"
fi

# If upgrading from before 2.4.0
if version_less_than $1 '2.4.0'
then
Expand Down

0 comments on commit 44e13b1

Please sign in to comment.