Skip to content
Snippets Groups Projects
Commit 8b9d48f6 authored by Edileuton Henrique de Oliveira's avatar Edileuton Henrique de Oliveira
Browse files

agent: Fix net usage collect on openSUSE and Fedora

parent fb49e670
No related branches found
No related tags found
No related merge requests found
......@@ -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
#------------------------------------------------------------------------------
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment