summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/opiealarm/Makefile6
-rw-r--r--core/opiealarm/opie-opiealarm.control2
-rwxr-xr-xcore/opiealarm/opieatd37
3 files changed, 2 insertions, 43 deletions
diff --git a/core/opiealarm/Makefile b/core/opiealarm/Makefile
index 03e6957..255083d 100644
--- a/core/opiealarm/Makefile
+++ b/core/opiealarm/Makefile
@@ -1,26 +1,22 @@
1 1
2DESTDIR=$(OPIEDIR)/bin 2DESTDIR=$(OPIEDIR)/bin
3 3
4CROSS:=arm-linux- 4CROSS:=arm-linux-
5CC :=$(CROSS)gcc 5CC :=$(CROSS)gcc
6LD :=$(CROSS)gcc 6LD :=$(CROSS)gcc
7STRIP:=$(CROSS)strip 7STRIP:=$(CROSS)strip
8 8
9CFLAGS:=-O2 9CFLAGS:=-O2
10LDFLAGS:= 10LDFLAGS:=
11 11
12all: $(DESTDIR)/opiealarm $(DESTDIR)/opieatd 12all: $(DESTDIR)/opiealarm
13 13
14$(DESTDIR)/opiealarm: opiealarm.c 14$(DESTDIR)/opiealarm: opiealarm.c
15 $(CC) $(CFLAGS) opiealarm.c -o $(DESTDIR)/opiealarm $(LDFLAGS) 15 $(CC) $(CFLAGS) opiealarm.c -o $(DESTDIR)/opiealarm $(LDFLAGS)
16 $(STRIP) --strip-all $(DESTDIR)/opiealarm 16 $(STRIP) --strip-all $(DESTDIR)/opiealarm
17 chmod u+s $(DESTDIR)/opiealarm 17 chmod u+s $(DESTDIR)/opiealarm
18 chown root $(DESTDIR)/opiealarm 2>/dev/null || echo -e "\nopiealarm must be owned by root to work correctly.\n" 18 chown root $(DESTDIR)/opiealarm 2>/dev/null || echo -e "\nopiealarm must be owned by root to work correctly.\n"
19 19
20$(DESTDIR)/opieatd: opieatd
21 cp opieatd $(DESTDIR)/opieatd
22 chmod +x $(DESTDIR)/opieatd
23
24clean: 20clean:
25 -rm -f *~ core 21 -rm -f *~ core
26 22
diff --git a/core/opiealarm/opie-opiealarm.control b/core/opiealarm/opie-opiealarm.control
index 9581649..175579f 100644
--- a/core/opiealarm/opie-opiealarm.control
+++ b/core/opiealarm/opie-opiealarm.control
@@ -1,13 +1,13 @@
1Files: bin/opiealarm bin/opieatd root/etc/init.d/opieatd root/etc/suspend-scripts/S46opiealarm root/etc/resume-scripts/R46opiealarm 1Files: bin/opiealarm root/etc/suspend-scripts/S46opiealarm root/etc/resume-scripts/R46opiealarm
2Priority: required 2Priority: required
3Provides: ipaqalarm 3Provides: ipaqalarm
4Conflicts: ipaqalarm 4Conflicts: ipaqalarm
5Section: opie/system 5Section: opie/system
6Maintainer: Robert Griebl <sandman@handhelds.org> 6Maintainer: Robert Griebl <sandman@handhelds.org>
7Architecture: arm 7Architecture: arm
8Version: $QPE_VERSION-$SUB_VERSION 8Version: $QPE_VERSION-$SUB_VERSION
9Depends: hotplug 9Depends: hotplug
10Description: A wakeup system for OPIE events. 10Description: A wakeup system for OPIE events.
11 Tiny, OPIE specific replacement for ipaqalarm, 11 Tiny, OPIE specific replacement for ipaqalarm,
12 uschedule and qpe2uschedule 12 uschedule and qpe2uschedule
13 13
diff --git a/core/opiealarm/opieatd b/core/opiealarm/opieatd
deleted file mode 100755
index 34dfb2e..0000000
--- a/core/opiealarm/opieatd
+++ b/dev/null
@@ -1,37 +0,0 @@
1#!/bin/sh
2
3timefile=/etc/resumeat
4
5trap exit 0 SIGTERM SIGINT SIGQUIT
6
7echo $$ >/var/run/opieatd.pid
8
9mkdir -p /var/spool/at
10[ -p /var/spool/at/trigger ] || mkfifo /var/spool/at/trigger
11
12while true; do
13 while read </var/spool/at/trigger dummy; do
14 FILES=`ls /var/spool/at/[0-9]* 2>/dev/null`
15
16 if [ -z "$FILES" ]; then
17 # echo "clear resume at"
18 echo "" >$timefile
19 else
20 for i in "$FILES"; do
21 # echo "File = $i"
22
23 unixtime=`basename $i | cut -c1-10`
24 pid=`basename $i | cut -c12-`
25
26 if [ -d /proc/$pid ]; then
27 # echo "Datestring = $unixtime"
28 echo "$unixtime" >$timefile
29 else
30 rm -f $i
31 fi
32 done
33 fi
34 done
35done
36
37exit 0