Subversion Repositories configs

Rev

Rev 57 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 57 Rev 95
Line 150... Line 150...
150
    return ${RETVAL}
150
    return ${RETVAL}
151
}
151
}
152
 
152
 
153
 
153
 
154
stop() {
154
stop() {
155
    if [ ! -e ${plutoctl} ]; then
155
    if [ -e ${plutoctl} ]; then
156
	echo "Missing control file ${plutoctl} - is pluto running?"
-
 
157
    else
-
 
158
	echo $"Shutting down pluto IKE daemon"
156
	echo $"Shutting down pluto IKE daemon"
159
	ipsec whack --shutdown
157
	ipsec whack --shutdown 2>/dev/null
160
	# don't use seq, might not exist on embedded
158
	# don't use seq, might not exist on embedded
161
	for waitsec in 1 2 3 4 5 6 7 8 9 10; do
159
	for waitsec in 1 2 3 4 5 6 7 8 9 10; do
162
	    if [ -s ${plutopid} ]; then
160
	    if [ -s ${plutopid} ]; then
163
		echo -n "."
161
		echo -n "."
164
		sleep 1
162
		sleep 1
Line 169... Line 167...
169
	echo
167
	echo
170
	rm -f ${plutoctl} # we won't be using this anymore
168
	rm -f ${plutoctl} # we won't be using this anymore
171
    fi
169
    fi
172
    if [ -s ${plutopid} ]; then
170
    if [ -s ${plutopid} ]; then
173
	# pluto did not die peacefully
171
	# pluto did not die peacefully
174
	echo "Attempt to shut Pluto down failed!  Trying kill"
-
 
175
	killproc -p ${plutopid} ${IPSEC_EXECDIR}/pluto
172
	killproc -p ${plutopid} ${IPSEC_EXECDIR}/pluto
176
	RETVAL=$?
173
	RETVAL=$?
177
	[ ${RETVAL} -eq 0 ] && rm -f ${plutopid}
174
	[ ${RETVAL} -eq 0 ] && rm -f ${plutopid}
178
    fi
175
    fi
179
 
176