diff options
| author | Bill Nottingham <notting@redhat.com> | 2001-07-16 18:42:27 +0000 |
|---|---|---|
| committer | Bill Nottingham <notting@redhat.com> | 2001-07-16 18:42:27 +0000 |
| commit | 1232e44021ec9cee1bede0107a85e3081443b7c6 (patch) | |
| tree | bd88d77dbce7ccaba456947bda69984f5800f4e2 /sysconfig | |
| parent | 196a77dbd38d11f22cd9960d943d572da3a5a843 (diff) | |
fix do_netreport to work for the non-root case
Diffstat (limited to 'sysconfig')
| -rw-r--r-- | sysconfig/network-scripts/network-functions | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions index 323701fc..47be1b84 100644 --- a/sysconfig/network-scripts/network-functions +++ b/sysconfig/network-scripts/network-functions @@ -38,8 +38,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 ) } |
