From 294a65132b88324d3ed917635fa84cf42f0a90f7 Mon Sep 17 00:00:00 2001 From: Jouke Witteveen Date: Sat, 30 Jun 2012 18:46:58 +0200 Subject: 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. --- src/network | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/network') 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 -- cgit v1.2.3-24-g4f1b