#include <fcntl.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>

#define LOCKDIR		"/var/spool/locks"
#define LOCKFILE	LOCKDIR"/LCK.ppp_attach"

main()
{
   struct stat stat_buf;

   if (stat(LOCKFILE, &stat_buf) == -1) {
      if (errno == ENOENT)
	 exit(0);
      else {
	 perror("Could not acces lock file");
	 exit(1);
      }
   }
   if (unlink(LOCKFILE) != 0)
      exit(1);
   else
      exit(0);
}

