home *** CD-ROM | disk | FTP | other *** search
/ BUG 1 / BUGCD1996_0708.ISO / pc / util / minilin / minilin.exe / USR / LIB / PPP / UNLOCK < prev   
Text File  |  1994-05-25  |  378b  |  24 lines

  1. #!/bin/sh
  2.  
  3. LOCKDIR=/var/spool/lock
  4.  
  5. case "$1" in
  6.     "")        echo "Usage: unlock lockfile"; exit 1 ;;
  7.     .*)        echo "Usage: unlock lockfile"; exit 1 ;;
  8. esac
  9.  
  10. if [ -f $LOCKDIR/$1 ]
  11. then
  12.     if [ `wc -c < $LOCKDIR/$1` -eq 4 ]
  13.     then
  14.         rm -f $LOCKDIR/$1
  15.         exit 0
  16.     else
  17.         echo "Usage: unlock lockfile"
  18.         exit 1
  19.     fi
  20. else
  21.     echo "lockfile" $LOCKDIR/$1 "does not exist"
  22.     exit 1
  23. fi
  24.