update lsb_release to use hash instead of which

This commit is contained in:
Kaladin Light 2016-05-15 12:29:05 -04:00
parent 5d9580fbdd
commit d096335d5f

View file

@ -64,11 +64,7 @@ If you think you received this message in error, you can post an issue on the Gi
exit 1 exit 1
} }
LSB_REL=$(which lsb_release) if hash lsb_release 2>/dev/null; then
if [[ -z $LSB_REL ]]; then
noOS_Support
else
PLAT=$($LSB_REL -si) PLAT=$($LSB_REL -si)
OSCN=$($LSB_REL -sc) # We want this to be trusty xenial or jessie OSCN=$($LSB_REL -sc) # We want this to be trusty xenial or jessie
@ -87,6 +83,8 @@ else
else else
noOS_Support noOS_Support
fi fi
else
noOS_Support
fi fi
echo "${PLAT}" > /tmp/DET_PLATFORM echo "${PLAT}" > /tmp/DET_PLATFORM