From 8b9d48f6f0cfa53351531540e82758e476a2595b Mon Sep 17 00:00:00 2001 From: Edileuton Henrique de Oliveira <eho09@c3sl.ufpr.br> Date: Tue, 10 Dec 2013 10:21:41 -0200 Subject: [PATCH] agent: Fix net usage collect on openSUSE and Fedora Signed-off-by: Edileuton Henrique de Oliveira <eho09@c3sl.ufpr.br> --- agent/bin/datasid-netmon.sh | 2 +- agent/bootstrap/install | 14 ++------------ 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/agent/bin/datasid-netmon.sh b/agent/bin/datasid-netmon.sh index e0c3138..9856446 100755 --- a/agent/bin/datasid-netmon.sh +++ b/agent/bin/datasid-netmon.sh @@ -100,7 +100,7 @@ IPTABLES=$(which iptables) test $? -ne 0 && IPTABLES="/sbin/iptables" test -x $IP || exit 1 -test -x $IPTABLES || (IPTABLES="/usr/sbin/iptables" && test -x $IPTABLES) || exit 1 +test -x $IPTABLES || IPTABLES="/usr/sbin/iptables" && test -x $IPTABLES || exit 1 #------------------------------------------------------------------------------ diff --git a/agent/bootstrap/install b/agent/bootstrap/install index 17e4da9..242342e 100644 --- a/agent/bootstrap/install +++ b/agent/bootstrap/install @@ -201,10 +201,8 @@ sed '/^\(Defaults:\)\?datasid/d' /etc/sudoers > "${TMPFILE}" # Add root permissions to datasid echo -e "datasid\tALL=(ALL) NOPASSWD: ALL" >> "${TMPFILE}" -# Remove on Fedora the requirement of tty for sudo -if grep -q "Fedora" /etc/issue; then - echo -e 'Defaults:datasid\t!requiretty' >> "${TMPFILE}" -fi +# Remove the requirement of tty for sudo +echo -e 'Defaults:datasid\t!requiretty' >> "${TMPFILE}" # Check if modified sudoers file is valid and apply it if ! visudo -cf "${TMPFILE}" || ! mv "${TMPFILE}" /etc/sudoers \ @@ -233,14 +231,6 @@ fi rm -f "${PKG_FILE}" -# Create conf/proxy -cat > conf/proxy << EOF -PROXY_HOST="${PROXY_HOST}" -PROXY_PORT="${PROXY_PORT}" -PROXY_USERNAME="${PROXY_USERNAME}" -PROXY_PASSWORD="${PROXY_PASSWORD}" -EOF - # Change files owner if ! chown -R datasid:datasid "${DATASID_HOME}"; then printf "FALHA!\n" >&3 -- GitLab