Add quotes around $DISTRO

The lsb_release -si output might contain spaces. E.g. on openSUSE it is
"openSUSE project".

Change-Id: I0e37bab54d0156f484433246bba7cdc686326c86
This commit is contained in:
Ralf Haferkamp 2013-12-18 14:28:51 +01:00
parent c04d472064
commit 2b846c7406
6 changed files with 6 additions and 6 deletions

View File

@ -9,7 +9,7 @@ fi
DISTRO=`lsb_release -si` || true DISTRO=`lsb_release -si` || true
if [[ "Fedora" = $DISTRO ]]; then if [[ "Fedora" = "$DISTRO" ]]; then
# Check if the iptables service is active # Check if the iptables service is active
if systemctl is-active iptables.service ; then if systemctl is-active iptables.service ; then

View File

@ -9,7 +9,7 @@ fi
DISTRO=`lsb_release -si` || true DISTRO=`lsb_release -si` || true
if [[ "Fedora" = $DISTRO ]]; then if [[ "Fedora" = "$DISTRO" ]]; then
# Check if the iptables service is active # Check if the iptables service is active
if systemctl is-active iptables.service ; then if systemctl is-active iptables.service ; then

View File

@ -9,7 +9,7 @@ fi
DISTRO=`lsb_release -si` || true DISTRO=`lsb_release -si` || true
if [[ "Fedora" = $DISTRO ]]; then if [[ "Fedora" = "$DISTRO" ]]; then
# Check if the iptables service is active # Check if the iptables service is active
if systemctl is-active iptables.service ; then if systemctl is-active iptables.service ; then

View File

@ -33,7 +33,7 @@ if [ -e $DONE_FILE ] ; then
fi fi
# MySQL may be stopped pre-configuration, so try to start it # MySQL may be stopped pre-configuration, so try to start it
if [ -d /etc/init ] && [ $DISTRO = "Ubuntu" ] ; then if [ -d /etc/init ] && [ "$DISTRO" = "Ubuntu" ] ; then
# Upstart: During initial boot, mysql will start in parallel with os-refresh-config # Upstart: During initial boot, mysql will start in parallel with os-refresh-config
# wait-for-state is a job that allows blocking until a particular state is reached. # wait-for-state is a job that allows blocking until a particular state is reached.
start wait-for-state WAIT_FOR=mysql WAITER=$(basename $0) WAIT_FOREVER=Y TARGET_GOAL=start WAIT_STATE=running start wait-for-state WAIT_FOR=mysql WAITER=$(basename $0) WAIT_FOREVER=Y TARGET_GOAL=start WAIT_STATE=running

View File

@ -3,7 +3,7 @@ set -eu
# Exit if not Fedora # Exit if not Fedora
DISTRO=`lsb_release -si` || true DISTRO=`lsb_release -si` || true
[ "Fedora" != $DISTRO ] && exit 0 [ "Fedora" != "$DISTRO" ] && exit 0
# Check if the iptables service is active # Check if the iptables service is active
if systemctl is-active iptables.service ; then if systemctl is-active iptables.service ; then

View File

@ -5,7 +5,7 @@ DISTRO=`lsb_release -si` || true
install-packages rabbitmq-server install-packages rabbitmq-server
# In Ubuntu rabbit's default init.d script is broken. # In Ubuntu rabbit's default init.d script is broken.
if [ x`lsb_release -si 2> /dev/null` = "xUbuntu" ]; then if [ "$DISTRO" == "Ubuntu" ]; then
update-rc.d -f rabbitmq-server remove update-rc.d -f rabbitmq-server remove
rm /etc/init.d/rabbitmq-server rm /etc/init.d/rabbitmq-server
cat > /etc/init/rabbitmq-server.conf <<eof cat > /etc/init/rabbitmq-server.conf <<eof