summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rwxr-xr-xcore/opiealarm/opieatd6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/opiealarm/opieatd b/core/opiealarm/opieatd
index fc2d421..34dfb2e 100755
--- a/core/opiealarm/opieatd
+++ b/core/opiealarm/opieatd
@@ -1,37 +1,37 @@
1#!/bin/sh 1#!/bin/sh
2 2
3timefile=/etc/resumeat 3timefile=/etc/resumeat
4 4
5trap exit 0 SIGTERM SIGINT SIGQUIT 5trap exit 0 SIGTERM SIGINT SIGQUIT
6 6
7echo $$ >/var/run/opieatd.pid 7echo $$ >/var/run/opieatd.pid
8 8
9mkdir -p /var/spool/at 9mkdir -p /var/spool/at
10[ -p /var/spool/at/trigger ] || mkfifo /var/spool/at/trigger 10[ -p /var/spool/at/trigger ] || mkfifo /var/spool/at/trigger
11 11
12while true; do 12while true; do
13 while read </var/spool/at/trigger dummy; do 13 while read </var/spool/at/trigger dummy; do
14 FILES=`ls /var/spool/at/[0-9]* 2>/dev/null` 14 FILES=`ls /var/spool/at/[0-9]* 2>/dev/null`
15 15
16 if [ -z "$FILES" ]; then 16 if [ -z "$FILES" ]; then
17 echo "clear resume at" 17 # echo "clear resume at"
18 echo "" >$timefile 18 echo "" >$timefile
19 else 19 else
20 for i in "$FILES"; do 20 for i in "$FILES"; do
21 echo "File = $i" 21 # echo "File = $i"
22 22
23 unixtime=`basename $i | cut -c1-10` 23 unixtime=`basename $i | cut -c1-10`
24 pid=`basename $i | cut -c12-` 24 pid=`basename $i | cut -c12-`
25 25
26 if [ -d /proc/$pid ]; then 26 if [ -d /proc/$pid ]; then
27 echo "Datestring = $unixtime" 27 # echo "Datestring = $unixtime"
28 echo "$unixtime" >$timefile 28 echo "$unixtime" >$timefile
29 else 29 else
30 rm -f $i 30 rm -f $i
31 fi 31 fi
32 done 32 done
33 fi 33 fi
34 done 34 done
35done 35done
36 36
37exit 0 37exit 0