updated on Mon Jan 16 04:00:32 UTC 2012
[aur-mirror.git] / switchconf / jf-al-pkg.patch
blob8255976234ea759d15f095c98abcf410f84c0920
1 diff -Nwaur src-jf-org/switchconf/Makefile src-jf/switchconf/Makefile
2 --- src-jf-org/switchconf/Makefile 2008-01-03 14:43:53.000000000 +0100
3 +++ src-jf/switchconf/Makefile 2008-02-06 12:28:31.000000000 +0100
4 @@ -28,7 +28,7 @@
5 cp conf $(DESTDIR)/$(ETCDIR)
6 cp plugins.before/* $(DESTDIR)/$(ETCDIR)/before.d/
7 cp plugins.after/* $(DESTDIR)/$(ETCDIR)/after.d/
8 - install -D init.d $(DESTDIR)/$(INITDIR)/$(PACKNAME)
9 + install -D rc.d $(DESTDIR)/$(INITDIR)/$(PACKNAME)
10 install -D $(PACKNAME) $(DESTDIR)/$(BINDIR)/$(PACKNAME)
12 test:
13 diff -Naur src/switchconf/Makefile src-jf/switchconf/Makefile
14 --- src/switchconf/Makefile 2007-09-09 01:33:13.000000000 +0200
15 +++ src-jf/switchconf/Makefile 2008-01-03 14:43:53.000000000 +0100
16 @@ -6,7 +6,7 @@
17 ETCDIR=/etc/$(PACKNAME)
18 MANDIR=/usr/share/man/man8
19 LOGROTATEDIR=/etc/logrotate.d
20 -INITDIR=/etc/init.d
21 +INITDIR=/etc/rc.d
24 all:
25 @@ -24,7 +24,7 @@
26 [ -d $(DESTDIR)/$(ETCDIR)/before.d ] || mkdir -p $(DESTDIR)/$(ETCDIR)/before.d
27 [ -d $(DESTDIR)/$(ETCDIR)/after.d ] || mkdir -p $(DESTDIR)/$(ETCDIR)/after.d
28 [ -d $(DESTDIR)/$(LOGROTATEDIR)/ ] || mkdir -p $(DESTDIR)/$(LOGROTATEDIR)
29 - cp debian/logrotate $(DESTDIR)/$(LOGROTATEDIR)/$(PACKNAME)
30 + cp logrotate $(DESTDIR)/$(LOGROTATEDIR)/$(PACKNAME)
31 cp conf $(DESTDIR)/$(ETCDIR)
32 cp plugins.before/* $(DESTDIR)/$(ETCDIR)/before.d/
33 cp plugins.after/* $(DESTDIR)/$(ETCDIR)/after.d/
34 --- src/switchconf/rc.d 1970-01-01 01:00:00.000000000 +0100
35 +++ src-jf/switchconf/rc.d 2008-02-06 13:53:36.000000000 +0100
36 @@ -0,0 +1,38 @@
37 +#!/bin/bash
39 +. /etc/rc.conf
40 +. /etc/rc.d/functions
42 +CMDLINE="/proc/cmdline"
44 +case "$1" in
45 + start)
46 + stat_busy "Starting $daemon_name"
47 + conf="$(sed -rne 's/(.*[[:space:]]|^)switchconf=([^[:space:]]+).*/\2/p' "$CMDLINE" | tr -d \\n)"
48 + if [ -z ${conf} ]; then
49 + echo "No switchconf kernel option"
50 + stat_fail
51 + exit 1
52 + else
53 + /usr/sbin/switchconf ${conf}
54 + fi
55 + if [ $? -gt 0 ]; then
56 + stat_fail
57 + exit 1
58 + else
59 + stat_done
60 + fi
61 + ;;
63 + stop)
64 + ;;
66 + restart)
67 + $0 stop
68 + sleep 3
69 + $0 start
70 + ;;
71 + *)
72 + echo "usage: $0 {start|stop|restart}"
73 +esac
74 +exit 0
75 diff -Naur src-org/switchconf/Makefile src-jf/switchconf/Makefile
76 --- src-org/switchconf/Makefile 2008-02-06 14:11:04.000000000 +0100
77 +++ src-jf/switchconf/Makefile 2008-02-06 14:15:13.000000000 +0100
78 @@ -26,8 +26,6 @@
79 [ -d $(DESTDIR)/$(LOGROTATEDIR)/ ] || mkdir -p $(DESTDIR)/$(LOGROTATEDIR)
80 cp logrotate $(DESTDIR)/$(LOGROTATEDIR)/$(PACKNAME)
81 cp conf $(DESTDIR)/$(ETCDIR)
82 - cp plugins.before/* $(DESTDIR)/$(ETCDIR)/before.d/
83 - cp plugins.after/* $(DESTDIR)/$(ETCDIR)/after.d/
84 install -D rc.d $(DESTDIR)/$(INITDIR)/$(PACKNAME)
85 install -D $(PACKNAME) $(DESTDIR)/$(BINDIR)/$(PACKNAME)