diff options
author | Bill Nottingham <notting@redhat.com> | 2001-07-16 18:41:11 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2001-07-16 18:41:11 +0000 |
commit | e8a0675ef3d5b11f05ca4548aeabd7d02d51e89a (patch) | |
tree | f9d907070b095ef3a133b0ccebc0270af89ca7f7 /sysconfig | |
parent | c4c7bc16a9301e4f14dff5f6133ff686a914a3e8 (diff) | |
download | initscripts-e8a0675ef3d5b11f05ca4548aeabd7d02d51e89a.tar initscripts-e8a0675ef3d5b11f05ca4548aeabd7d02d51e89a.tar.gz initscripts-e8a0675ef3d5b11f05ca4548aeabd7d02d51e89a.tar.bz2 initscripts-e8a0675ef3d5b11f05ca4548aeabd7d02d51e89a.tar.xz initscripts-e8a0675ef3d5b11f05ca4548aeabd7d02d51e89a.zip |
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 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 ) } |