]> git.ipfire.org Git - people/ms/network.git/commitdiff
modem: Don't log empty lines.
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 19 May 2013 18:30:31 +0000 (20:30 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 19 May 2013 18:30:31 +0000 (20:30 +0200)
functions.modem

index 8b115fca429f3b55e8a576cd8a1fd182b5fe8c71..ab9f587a68384600608e599a15c519800af41731 100644 (file)
@@ -104,15 +104,14 @@ function __modem_chat_process_output() {
        local counter=0
 
        local line
-       while read line; do
-               log DEBUG "Output[${counter}]: ${line}"
-
+       while read -r line; do
                # Also skip empty lines.
                [ -n "${line}" ] || continue
 
                # Ignore all volatile messages.
                [ "${line:0:1}" = "^" ] && continue
 
+               log DEBUG "Output[${counter}]: ${line}"
                counter=$(( ${counter} + 1 ))
 
                # Skip the first line, because that's out command.