dsl_cpe_pipe.sh 279 B

123456789101112131415161718
  1. #!/bin/sh
  2. pipe_no=0
  3. # use specified pipe no
  4. case "$1" in
  5. 0|1|2)
  6. pipe_no=$1; shift; ;;
  7. esac
  8. #echo "Call dsl_pipe with $*"
  9. lock /var/lock/dsl_pipe
  10. echo $* > /tmp/pipe/dsl_cpe${pipe_no}_cmd
  11. result=`cat /tmp/pipe/dsl_cpe${pipe_no}_ack`
  12. lock -u /var/lock/dsl_pipe
  13. echo "$result"