diff options
author | Jouke Witteveen <j.witteveen@gmail.com> | 2012-06-30 18:46:58 +0200 |
---|---|---|
committer | Jouke Witteveen <j.witteveen@gmail.com> | 2012-06-30 18:46:58 +0200 |
commit | 294a65132b88324d3ed917635fa84cf42f0a90f7 (patch) | |
tree | b03006274ef6eb3ebdd77627ec559d71895e8f04 /src | |
parent | 9eb995ef8a34d552077b2af02787574a6534b1e2 (diff) | |
download | netctl-294a65132b88324d3ed917635fa84cf42f0a90f7.tar.gz netctl-294a65132b88324d3ed917635fa84cf42f0a90f7.tar.xz |
Don't be cryptic
The new way (cat) is common for netcfg and more readable.
The old way (echo $(< )) is faster, but that is completely subordinate to readability, here.
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 8ca90ec..20cc4fd 100644 --- a/src/network +++ b/src/network @@ -296,7 +296,7 @@ interface_reconnect() # check_iface() { if [[ -f "$STATE_DIR/interfaces/$1" ]]; then - echo "$(< "$STATE_DIR/interfaces/$1")" + cat "$STATE_DIR/interfaces/$1" return 0 else return 1 @@ -309,6 +309,7 @@ list_profiles() { # JP: follow aliases with -L, also skip profiles that start with '.' or end with '~' or '.conf' (so profile.conf can be the wpa.conf file for profile) find -L "$PROFILE_DIR/" -maxdepth 1 -type f -not -name '*~' -not -name '*.conf' -not -name '.*' -printf "%f\n" } + # check_profile profile # Return 0 if profile registered as being up # Return 1 if profile not registered |