aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sysconfig/network-scripts/network-functions7
1 files changed, 6 insertions, 1 deletions
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions
index 49542d87..3ce52335 100644
--- a/sysconfig/network-scripts/network-functions
+++ b/sysconfig/network-scripts/network-functions
@@ -50,8 +50,13 @@ do_netreport ()
for i in * ; do
if [ -f $i ]; then
OWNER=`ls -l $i | awk '{ print $3 }'`
- su $OWNER -c "kill -SIGIO $i >/dev/null 2>&1 || rm -f $i >/dev/null 2>&1" > /dev/null 2>&1
+
+ if [ "`id -u`" = "0" ]; then
+ su $OWNER -c "kill -SIGIO $i >/dev/null 2>&1 || rm -f $i >/dev/null 2>&1" > /dev/null 2>&1
+ else
+ kill -SIGIO $i >/dev/null 2>&1 || rm -f $i >/dev/null 2>&1
fi
+ fi
done
)
}