From: | "Alon Bar-Lev (alonbl)" <alonbl@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo-x86 commit in net-misc/openvpn/files: down.sh up.sh |
Date: | Wed, 30 Jan 2008 15:05:29 |
Message-Id: | E1JKEVD-0000zt-27@stork.gentoo.org |
1 | alonbl 08/01/30 15:05:27 |
2 | |
3 | Modified: down.sh up.sh |
4 | Log: |
5 | If SVCNAME does not exist avoid doing service magic |
6 | (Portage version: 2.1.4) |
7 | |
8 | Revision Changes Path |
9 | 1.7 net-misc/openvpn/files/down.sh |
10 | |
11 | file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/openvpn/files/down.sh?rev=1.7&view=markup |
12 | plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/openvpn/files/down.sh?rev=1.7&content-type=text/plain |
13 | diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/openvpn/files/down.sh?r1=1.6&r2=1.7 |
14 | |
15 | Index: down.sh |
16 | =================================================================== |
17 | RCS file: /var/cvsroot/gentoo-x86/net-misc/openvpn/files/down.sh,v |
18 | retrieving revision 1.6 |
19 | retrieving revision 1.7 |
20 | diff -u -r1.6 -r1.7 |
21 | --- down.sh 25 Sep 2007 12:47:01 -0000 1.6 |
22 | +++ down.sh 30 Jan 2008 15:05:26 -0000 1.7 |
23 | @@ -20,10 +20,12 @@ |
24 | fi |
25 | fi |
26 | |
27 | -# Re-enter the init script to start any dependant services |
28 | -if /etc/init.d/"${SVCNAME}" --quiet status ; then |
29 | - export IN_BACKGROUND=true |
30 | - /etc/init.d/"${SVCNAME}" --quiet stop |
31 | +if [ -n "${SVCNAME}" ]; then |
32 | + # Re-enter the init script to start any dependant services |
33 | + if /etc/init.d/"${SVCNAME}" --quiet status ; then |
34 | + export IN_BACKGROUND=true |
35 | + /etc/init.d/"${SVCNAME}" --quiet stop |
36 | + fi |
37 | fi |
38 | |
39 | exit 0 |
40 | |
41 | |
42 | |
43 | 1.13 net-misc/openvpn/files/up.sh |
44 | |
45 | file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/openvpn/files/up.sh?rev=1.13&view=markup |
46 | plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/openvpn/files/up.sh?rev=1.13&content-type=text/plain |
47 | diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/openvpn/files/up.sh?r1=1.12&r2=1.13 |
48 | |
49 | Index: up.sh |
50 | =================================================================== |
51 | RCS file: /var/cvsroot/gentoo-x86/net-misc/openvpn/files/up.sh,v |
52 | retrieving revision 1.12 |
53 | retrieving revision 1.13 |
54 | diff -u -r1.12 -r1.13 |
55 | --- up.sh 3 Oct 2007 12:05:40 -0000 1.12 |
56 | +++ up.sh 30 Jan 2008 15:05:26 -0000 1.13 |
57 | @@ -64,15 +64,17 @@ |
58 | # Quick summary - our init scripts are re-entrant and set the SVCNAME env var |
59 | # as we could have >1 openvpn service |
60 | |
61 | -# If we have a service specific script, run this now |
62 | -if [ -x /etc/openvpn/"${SVCNAME}"-up.sh ] ; then |
63 | - /etc/openvpn/"${SVCNAME}"-up.sh "$@" |
64 | -fi |
65 | +if [ -n "${SVCNAME}" ]; then |
66 | + # If we have a service specific script, run this now |
67 | + if [ -x /etc/openvpn/"${SVCNAME}"-up.sh ] ; then |
68 | + /etc/openvpn/"${SVCNAME}"-up.sh "$@" |
69 | + fi |
70 | |
71 | -# Re-enter the init script to start any dependant services |
72 | -if ! /etc/init.d/"${SVCNAME}" --quiet status ; then |
73 | - export IN_BACKGROUND=true |
74 | - /etc/init.d/${SVCNAME} --quiet start |
75 | + # Re-enter the init script to start any dependant services |
76 | + if ! /etc/init.d/"${SVCNAME}" --quiet status ; then |
77 | + export IN_BACKGROUND=true |
78 | + /etc/init.d/${SVCNAME} --quiet start |
79 | + fi |
80 | fi |
81 | |
82 | exit 0 |
83 | |
84 | |
85 | |
86 | -- |
87 | gentoo-commits@l.g.o mailing list |