diff options
author | Jouke Witteveen <j.witteveen@gmail.com> | 2012-06-14 17:09:42 +0200 |
---|---|---|
committer | Jouke Witteveen <j.witteveen@gmail.com> | 2012-06-14 17:09:42 +0200 |
commit | d2656b7dab538dcb7b5e49c6ac4aa5833a883a8c (patch) | |
tree | 6c2b3a293662547f740635e62d3d5c82bfbec386 /src | |
parent | fc98a15f18bc19b7323ae7fdcd23d5338fcf2742 (diff) | |
download | netctl-d2656b7dab538dcb7b5e49c6ac4aa5833a883a8c.tar.gz netctl-d2656b7dab538dcb7b5e49c6ac4aa5833a883a8c.tar.xz |
Less forking
Suggestion by Dave Reisner.
Diffstat (limited to 'src')
-rw-r--r-- | src/network | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/network b/src/network index 4858144..e8c2ae1 100644 --- a/src/network +++ b/src/network @@ -364,7 +364,8 @@ is_interface() { } interface_is_up() { - local flags="$(< "/sys/class/net/$1/flags")" + local flags + read flags < "/sys/class/net/$1/flags" # IFF_UP is defined as 0x1 in linux/if.h (( flags & 0x1 )) } |