collect: Fix net usage collect on openSUSE and Fedora

Signed-off-by: 's avatarEdileuton Henrique de Oliveira <eho09@c3sl.ufpr.br>
parent 459e4410
......@@ -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 \
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment