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

Commit

Permalink
Merge pull request #2863 from dkliban/fix-relabel.sh
Browse files Browse the repository at this point in the history
Fixes relabel.sh to handle empty string being passed in.
  • Loading branch information
dkliban committed Nov 23, 2016
2 parents 454f099 + 44e13b1 commit d3e776b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions server/selinux/server/relabel.sh
Original file line number Diff line number Diff line change
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 d3e776b

Please sign in to comment.