aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/network-functions
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2010-02-21 21:21:48 +0200
committerBill Nottingham <notting@redhat.com>2011-02-28 15:31:44 -0500
commit5212d0a596d67bbd2f5effdd3686c123f778078f (patch)
tree78f41b7fd9ed97f6326a61c7da25f0b9fabec0df /sysconfig/network-scripts/network-functions
parent681717364c786083356ebe5d92c4cc6fd73af307 (diff)
downloadinitscripts-5212d0a596d67bbd2f5effdd3686c123f778078f.tar
initscripts-5212d0a596d67bbd2f5effdd3686c123f778078f.tar.gz
initscripts-5212d0a596d67bbd2f5effdd3686c123f778078f.tar.bz2
initscripts-5212d0a596d67bbd2f5effdd3686c123f778078f.tar.xz
initscripts-5212d0a596d67bbd2f5effdd3686c123f778078f.zip
Drop some unnecessary command invocations.
Diffstat (limited to 'sysconfig/network-scripts/network-functions')
-rw-r--r--sysconfig/network-scripts/network-functions5
1 files changed, 2 insertions, 3 deletions
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions
index 562fe7cb..0d2528ee 100644
--- a/sysconfig/network-scripts/network-functions
+++ b/sysconfig/network-scripts/network-functions
@@ -51,7 +51,7 @@ get_config_by_name ()
get_device_by_hwaddr ()
{
- LANG=C ip -o link | grep -v link/ieee802.11 | awk -F ': ' -vIGNORECASE=1 "/$1/ { print \$2 }"
+ LANG=C ip -o link | awk -F ': ' -vIGNORECASE=1 '!/link\/ieee802\.11/ && /'"$1"'/ { print $2 }'
}
get_uuid_by_config ()
@@ -207,9 +207,8 @@ do_netreport ()
( cd /var/run/netreport || exit
for i in * ; do
if [ -f $i ]; then
- OWNER=$(ls -l $i | awk '{ print $3 }')
-
if [ "$(id -u)" = "0" ]; then
+ OWNER=$(stat -c %U $i)
su -s /bin/bash $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