1 Index: strongswan-2.8.2/programs/Makefile
2 ===================================================================
3 --- strongswan-2.8.2.orig/programs/Makefile 2007-06-04 13:23:04.661025312 +0200
4 +++ strongswan-2.8.2/programs/Makefile 2007-06-04 13:23:06.414758704 +0200
6 SUBDIRS+=_realsetup _secretcensor _startklips _updown _updown_espmark
7 SUBDIRS+=auto barf ipsec look manual ranbits secrets starter
8 SUBDIRS+=rsasigkey send-pr setup showdefaults showhostkey calcgoo mailkey
9 -SUBDIRS+=ikeping examples openac scepclient
10 +SUBDIRS+=ikeping examples openac scepclient _showstatus wakeup
12 ifeq ($(USE_LWRES),true)
14 Index: strongswan-2.8.2/programs/_showstatus/Makefile
15 ===================================================================
16 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
17 +++ strongswan-2.8.2/programs/_showstatus/Makefile 2007-06-04 13:23:06.414758704 +0200
19 +# Makefile for miscelaneous programs
20 +# Copyright (C) 2002 Michael Richardson <mcr@freeswan.org>
22 +# This program is free software; you can redistribute it and/or modify it
23 +# under the terms of the GNU General Public License as published by the
24 +# Free Software Foundation; either version 2 of the License, or (at your
25 +# option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
27 +# This program is distributed in the hope that it will be useful, but
28 +# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
29 +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
32 +# RCSID $Id: Makefile,v 1.3 2006/04/17 06:48:49 as Exp $
35 +include ${FREESWANSRCDIR}/Makefile.inc
40 +include ../Makefile.program
41 Index: strongswan-2.8.2/programs/_showstatus/_showstatus.8
42 ===================================================================
43 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
44 +++ strongswan-2.8.2/programs/_showstatus/_showstatus.8 2007-06-04 13:23:06.414758704 +0200
46 +.TH _showstatus 8 "03 Feb 2007"
48 +.\" RCSID $Id: _showstatus.8
51 +ipsec _showstatus \- give state feedback via led or other method
54 +is invoked by _updown to trigger led's, or other distribution
55 +or platform specific behavior. Presently, the SES button is
56 +supported as a status light on OpenWRT platforms. The button
57 +is configurable by environment variable:
58 +-B IPSEC_STATUS_LED_START
59 +defaults to ses_orange, and
60 +-B IPSEC_STATUS_LED_VALID
61 +defaults to ses_white.
63 +ipsec(8), ipsec_updown(8).
65 +Man page written for the Linux strongSwan project <http://www.strongswan.org/>
66 +by Kevin Cody Jr. Original manpage for _updown by Michael Richardson.
67 +Original program written by Henry Spencer. Extended for the Linux strongSwan
68 +project <http://www.strongswan.org/> by Andreas Steffen.
69 Index: strongswan-2.8.2/programs/_showstatus/_showstatus.in
70 ===================================================================
71 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
72 +++ strongswan-2.8.2/programs/_showstatus/_showstatus.in 2007-06-04 13:23:06.414758704 +0200
76 +# Copyright (C) 2007 Kevin Cody Jr. <kcody@vegaresearch.com>
78 +# This program is free software; you can redistribute it and/or modify it
79 +# under the terms of the GNU General Public License as published by the
80 +# Free Software Foundation; either version 2 of the License, or (at your
81 +# option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
83 +# This program is distributed in the hope that it will be useful, but
84 +# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
85 +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
88 +# RCSID $Id: _showstatus.in
91 +LED_START=$IPSEC_STATUS_LED_START
92 +LED_VALID=$IPSEC_STATUS_LED_VALID
94 +[ -z "$LED_START" ] && LED_START="ses_orange"
95 +[ -z "$LED_VALID" ] && LED_VALID="ses_white"
102 + [ -n "$led" -a -n "$st" ] || return
104 + if [ -w "/proc/diag/led/$led" ] ; then
105 + echo "$st" > "/proc/diag/led/$led"
108 + # integrate other led control methods here
115 + [ -n "$LED_VALID" ] && setled "$LED_START" 1
116 + [ -z "$LED_VALID" ] && setled "$LED_START" f
117 + setled "$LED_VALID" 0
120 + setled "$LED_START" 0
121 + setled "$LED_VALID" 0
124 + setled "$LED_VALID" 1
127 + setled "$LED_VALID" 0
130 + [ -n "$LED_VALID" ] && setled "$LED_START" 0
131 + [ -z "$LED_VALID" ] && setled "$LED_START" 1
132 + setled "$LED_VALID" 1
135 + [ -n "$LED_VALID" ] && setled "$LED_START" 1
136 + [ -z "$LED_VALID" ] && setled "$LED_START" f
137 + setled "$LED_VALID" f
140 + echo "$0: unknown status $status" >&2
144 Index: strongswan-2.8.2/programs/wakeup/Makefile
145 ===================================================================
146 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
147 +++ strongswan-2.8.2/programs/wakeup/Makefile 2007-06-04 13:23:06.415758552 +0200
149 +# Makefile for miscelaneous programs
150 +# Copyright (C) 2002 Michael Richardson <mcr@freeswan.org>
152 +# This program is free software; you can redistribute it and/or modify it
153 +# under the terms of the GNU General Public License as published by the
154 +# Free Software Foundation; either version 2 of the License, or (at your
155 +# option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
157 +# This program is distributed in the hope that it will be useful, but
158 +# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
159 +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
162 +# RCSID $Id: Makefile,v 1.3 2006/04/17 06:48:49 as Exp $
164 +FREESWANSRCDIR=../..
165 +include ${FREESWANSRCDIR}/Makefile.inc
168 +PROGRAMDIR=${LIBDIR}
170 +include ../Makefile.program
171 Index: strongswan-2.8.2/programs/wakeup/wakeup.8
172 ===================================================================
173 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
174 +++ strongswan-2.8.2/programs/wakeup/wakeup.8 2007-06-04 13:23:06.415758552 +0200
176 +.TH wakeup 8 "03 Feb 2007"
178 +.\" RCSID $Id: wakeup.8
181 +ipsec wakeup \- stalled and down connection detection
184 +is invoked by cron and checks ipsec status, whacking as necessary.
186 +ipsec(8), ipsec_whack(8).
188 +Man page written for the Linux strongSwan project <http://www.strongswan.org/>
189 +by Kevin Cody Jr. Original manpage for _updown by Michael Richardson.
190 +Original program written by Henry Spencer. Extended for the Linux strongSwan
191 +project <http://www.strongswan.org/> by Andreas Steffen.
192 Index: strongswan-2.8.2/programs/wakeup/wakeup.in
193 ===================================================================
194 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
195 +++ strongswan-2.8.2/programs/wakeup/wakeup.in 2007-06-04 13:23:06.415758552 +0200
200 +# Copyright (C) 2007 Kevin Cody Jr. <kcody@vegaresearch.com>
202 +# This program is free software; you can redistribute it and/or modify it
203 +# under the terms of the GNU General Public License as published by the
204 +# Free Software Foundation; either version 2 of the License, or (at your
205 +# option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
207 +# This program is distributed in the hope that it will be useful, but
208 +# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
209 +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
213 +# only applicable when ipsec is running
214 +[ -e /var/run/pluto.pid ] || exit
216 +# loop through any erouted tunnels in the HOLD state
217 +for f in `ipsec status | awk '/erouted HOLD/{ print $2 }' | cut -f1 -d\: | cut -f2 -d\"` ; do
219 + # only whack if no pending events at all exists
220 + ipsec status | grep STATE | grep -q $f ||
221 + ipsec whack --name $f --initiate --asynchronous
225 +# loop through any tunnels that don't quite exist
226 +for f in `ipsec status | awk '/prospective erouted/{ print $2 }' | cut -f1 -d: | grep -v \# | cut -f2 -d\"` ; do
228 + ipsec status | grep STATE_QUICK | grep -q $f || {
229 + ipsec status | grep STATE_MAIN | grep -q $f && ipsec down $f