]> granicus.if.org Git - sysstat/commit
Fix #189: [: n: unexpected operator
authorSebastien GODARD <sysstat@users.noreply.github.com>
Fri, 21 Sep 2018 11:44:45 +0000 (13:44 +0200)
committerSebastien GODARD <sysstat@users.noreply.github.com>
Fri, 21 Sep 2018 11:44:45 +0000 (13:44 +0200)
commitf2f27905570996d79b0130d6feee89993c08d81f
tree58b7e1d3f7293f313e53c699edf1b11493cc2369
parent131ff13e5eb90e544c6d42c309adeb9e8947db88
Fix #189: [: n: unexpected operator

On some systems, installing sysstat lead to the following error:

elif [ -d /etc ]; then \
        install -m 755 sysstat /etc/rc.sysstat; \
        if [ "n" == "n" ]; then \
                if [ -x "" ]; then \
                        cd /etc &&  --add rc.sysstat; \
                else \
                        [ -d /etc/rc2.d ] || mkdir -p /etc/rc2.d; \
                        [ -d /etc/rc3.d ] || mkdir -p /etc/rc3.d; \
                        [ -d /etc/rc5.d ] || mkdir -p /etc/rc5.d; \
                        cd /etc/rc2.d && ln -s -f ../rc.sysstat S01sysstat; \
                        cd /etc/rc3.d && ln -s -f ../rc.sysstat S01sysstat; \
                        cd /etc/rc5.d && ln -s -f ../rc.sysstat S01sysstat; \
                fi \
        fi \
fi
/bin/sh: 9: [: n: unexpected operator

This is because POSIX sh does not support == for string equality.
This is supported only by bash.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
Makefile.in