From bf13813d8c277a0bb9baf121e1a6ddbaa1e1dd8e Mon Sep 17 00:00:00 2001 From: sandman Date: Fri, 31 May 2002 03:55:42 +0000 Subject: Initial check in of opiealarm/opieatd This is a (tiny) replacement for ipaqalarm/qpe2uschedule/uscheduled Made w2k-ppp only claim the needed files (not the whole etc dir) --- (limited to 'core/opiealarm/opieatd') diff --git a/core/opiealarm/opieatd b/core/opiealarm/opieatd new file mode 100755 index 0000000..3b9dc0e --- a/dev/null +++ b/core/opiealarm/opieatd @@ -0,0 +1,22 @@ +#!/bin/sh + +timefile=/etc/resumeat + +mkdir -p /var/spool/at +[ -p /var/spool/at/trigger ] || mkfifo /var/spool/at/trigger + +while true; do + cat /var/spool/at/trigger | while read line; do + FILE=`ls -1 /var/spool/at/[0-9]* | head -n1` + echo "File = $FILE" + if [ -z "$FILE" ]; then + echo "clear resume at" + echo "" >$timefile + else + unixtime=`basename $FILE | cut -c1-10` + echo "Datestring = $unixtime" + echo "$unixtime" >$timefile + fi + done +done + -- cgit v0.9.0.2