lantiq: Synchronize access to the DSL command pipe
[openwrt/openwrt.git] / target / linux / lantiq / base-files / lib / functions / lantiq_dsl.sh
index dbeb344..22e65cb 100755 (executable)
@@ -12,8 +12,10 @@ fi
 #
 dsl_cmd() {
        killall -0 ${XDSL_CTRL} && (
+               lock /var/lock/dsl_pipe
                echo "$@" > /tmp/pipe/dsl_cpe0_cmd
                cat /tmp/pipe/dsl_cpe0_ack
+               lock -u /var/lock/dsl_pipe
        )
 }
 dsl_val() {