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

Fixes relabel.sh to handle empty string being passed in. #2863

Merged
merged 1 commit into from
Nov 23, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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"
Copy link
Contributor

Choose a reason for hiding this comment

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

BASH VOODOO MAGIC

fi

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