From ed72646e8ab2ec7a6d693f4add2511cd665bf37a Mon Sep 17 00:00:00 2001 From: Edileuton Henrique de Oliveira <eho09@c3sl.ufpr.br> Date: Tue, 10 Dec 2013 10:26:49 -0200 Subject: [PATCH] collect: Fix net usage collect on openSUSE and Fedora Signed-off-by: Edileuton Henrique de Oliveira <eho09@c3sl.ufpr.br> --- build/bootstraps/bootstrap-install.sh | 6 ++---- collect/net/bandwidth.sh | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/build/bootstraps/bootstrap-install.sh b/build/bootstraps/bootstrap-install.sh index 470dcec..53f11f0 100755 --- a/build/bootstraps/bootstrap-install.sh +++ b/build/bootstraps/bootstrap-install.sh @@ -235,10 +235,8 @@ if ! test -n "${PROJECTOR}" -o -f "/usr/sbin/projetor" -o \ # Add root permissions to datasid echo -e "seed_mec\tALL=(ALL) NOPASSWD: ALL" >> "${TMPFILE}" - # Remove on Fedora the requirement of tty for sudo - if grep -q "Fedora" /etc/issue; then - echo -e 'Defaults:seed_mec\t!requiretty' >> "${TMPFILE}" - fi + # Remove the requirement of tty for sudo + echo -e 'Defaults:seed_mec\t!requiretty' >> "${TMPFILE}" # Check if modified sudoers file is valid and apply it if ! visudo -cf "${TMPFILE}" || ! mv "${TMPFILE}" /etc/sudoers \ diff --git a/collect/net/bandwidth.sh b/collect/net/bandwidth.sh index 3326fd4..76ef484 100755 --- a/collect/net/bandwidth.sh +++ b/collect/net/bandwidth.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 #------------------------------------------------------------------------------ # Calculate bytes and packets counts and print to TRAFFIC -- GitLab