summaryrefslogtreecommitdiff
path: root/core/opiealarm/opieatd
authorsandman <sandman>2002-05-31 03:55:42 (UTC)
committer sandman <sandman>2002-05-31 03:55:42 (UTC)
commitbf13813d8c277a0bb9baf121e1a6ddbaa1e1dd8e (patch) (unidiff)
tree1d60d5ebc7447340a629bae6344995106921f0e8 /core/opiealarm/opieatd
parent460454a3a117afafde6094da6a4e12625f880908 (diff)
downloadopie-bf13813d8c277a0bb9baf121e1a6ddbaa1e1dd8e.zip
opie-bf13813d8c277a0bb9baf121e1a6ddbaa1e1dd8e.tar.gz
opie-bf13813d8c277a0bb9baf121e1a6ddbaa1e1dd8e.tar.bz2
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)
Diffstat (limited to 'core/opiealarm/opieatd') (more/less context) (ignore whitespace changes)
-rwxr-xr-xcore/opiealarm/opieatd22
1 files changed, 22 insertions, 0 deletions
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 @@
1#!/bin/sh
2
3timefile=/etc/resumeat
4
5mkdir -p /var/spool/at
6[ -p /var/spool/at/trigger ] || mkfifo /var/spool/at/trigger
7
8while true; do
9 cat /var/spool/at/trigger | while read line; do
10 FILE=`ls -1 /var/spool/at/[0-9]* | head -n1`
11 echo "File = $FILE"
12 if [ -z "$FILE" ]; then
13 echo "clear resume at"
14 echo "" >$timefile
15 else
16 unixtime=`basename $FILE | cut -c1-10`
17 echo "Datestring = $unixtime"
18 echo "$unixtime" >$timefile
19 fi
20 done
21done
22