-rw-r--r-- | core/opiealarm/Makefile | 6 | ||||
-rw-r--r-- | core/opiealarm/opie-opiealarm.control | 2 | ||||
-rwxr-xr-x | core/opiealarm/opieatd | 37 |
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 | ||
2 | DESTDIR=$(OPIEDIR)/bin | 2 | DESTDIR=$(OPIEDIR)/bin |
3 | 3 | ||
4 | CROSS:=arm-linux- | 4 | CROSS:=arm-linux- |
5 | CC :=$(CROSS)gcc | 5 | CC :=$(CROSS)gcc |
6 | LD :=$(CROSS)gcc | 6 | LD :=$(CROSS)gcc |
7 | STRIP:=$(CROSS)strip | 7 | STRIP:=$(CROSS)strip |
8 | 8 | ||
9 | CFLAGS:=-O2 | 9 | CFLAGS:=-O2 |
10 | LDFLAGS:= | 10 | LDFLAGS:= |
11 | 11 | ||
12 | all: $(DESTDIR)/opiealarm $(DESTDIR)/opieatd | 12 | all: $(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 | |||
24 | clean: | 20 | clean: |
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 @@ | |||
1 | Files: bin/opiealarm bin/opieatd root/etc/init.d/opieatd root/etc/suspend-scripts/S46opiealarm root/etc/resume-scripts/R46opiealarm | 1 | Files: bin/opiealarm root/etc/suspend-scripts/S46opiealarm root/etc/resume-scripts/R46opiealarm |
2 | Priority: required | 2 | Priority: required |
3 | Provides: ipaqalarm | 3 | Provides: ipaqalarm |
4 | Conflicts: ipaqalarm | 4 | Conflicts: ipaqalarm |
5 | Section: opie/system | 5 | Section: opie/system |
6 | Maintainer: Robert Griebl <sandman@handhelds.org> | 6 | Maintainer: Robert Griebl <sandman@handhelds.org> |
7 | Architecture: arm | 7 | Architecture: arm |
8 | Version: $QPE_VERSION-$SUB_VERSION | 8 | Version: $QPE_VERSION-$SUB_VERSION |
9 | Depends: hotplug | 9 | Depends: hotplug |
10 | Description: A wakeup system for OPIE events. | 10 | Description: 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 | |||
3 | timefile=/etc/resumeat | ||
4 | |||
5 | trap exit 0 SIGTERM SIGINT SIGQUIT | ||
6 | |||
7 | echo $$ >/var/run/opieatd.pid | ||
8 | |||
9 | mkdir -p /var/spool/at | ||
10 | [ -p /var/spool/at/trigger ] || mkfifo /var/spool/at/trigger | ||
11 | |||
12 | while 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 | ||
35 | done | ||
36 | |||
37 | exit 0 | ||