mirror of https://github.com/hak5/openwrt-owl.git
lantiq: Synchronize access to the DSL command pipe
Whenever two processes were executing different commands at the same time then one of the commands sometimes got the response of the other command. Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> SVN-Revision: 47213owl
parent
21e1b4163f
commit
e1d585d99f
|
@ -12,8 +12,10 @@ fi
|
||||||
#
|
#
|
||||||
dsl_cmd() {
|
dsl_cmd() {
|
||||||
killall -0 ${XDSL_CTRL} && (
|
killall -0 ${XDSL_CTRL} && (
|
||||||
|
lock /var/lock/dsl_pipe
|
||||||
echo "$@" > /tmp/pipe/dsl_cpe0_cmd
|
echo "$@" > /tmp/pipe/dsl_cpe0_cmd
|
||||||
cat /tmp/pipe/dsl_cpe0_ack
|
cat /tmp/pipe/dsl_cpe0_ack
|
||||||
|
lock -u /var/lock/dsl_pipe
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
dsl_val() {
|
dsl_val() {
|
||||||
|
|
Loading…
Reference in New Issue