Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:kroimon
openswan
openswan_30_rcscript.dif
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File openswan_30_rcscript.dif of Package openswan
--- programs/setup/setup.in 2009-09-09 02:42:54.000000000 +0200 +++ programs/setup/setup.in 2009-12-24 12:15:58.000000000 +0100 @@ -43,6 +43,24 @@ # description: IPsec provides encrypted and authenticated communications; \ # KLIPS is the kernel half of it, Pluto is the user-level management daemon. +### BEGIN INIT INFO +# Provides: ipsec +# Required-Start: $network $syslog $remote_fs $named +# Required-Stop: $network $syslog $remote_fs +# Default-Start: 3 4 5 +# Default-Stop: 0 1 2 6 +# Short-Description: Start openswan IPSec +# Description: IPSEC provides encrypted and authenticated communications +# via a unsafe network, such as the internet (VPN). +# This scripts loads the kernel module and starts the +# user-space setup (pluto). +### END INIT INFO + +. /etc/rc.status +rc_reset +return=$rc_done +export rc_failed rc_done rc_running rc_unused rc_dead + me='ipsec setup' # for messages # where the private directory and the config files are @@ -75,7 +93,7 @@ then echo "cannot find ipsec command -- \`$1' aborted" | logger -s -p daemon.error -t ipsec_setup - exit 1 + test "$1" == "stop" && exit 0 || exit 5 # not installed fi # accept a few flags @@ -103,7 +121,7 @@ if [ $? != 0 ] then echo "Failed to parse config setup portion of ipsec.conf" - exit $? + test "$1" == "stop" && exit 0 || exit 6 # not configured fi eval $variables @@ -112,11 +130,13 @@ case $1 in stop|--stop|_autostop) echo "$IPSEC_confreadstatus -- \`$1' may not work" | - logger -s -p daemon.error -t ipsec_setup;; - + logger -s -p daemon.error -t ipsec_setup + exit 0 + ;; *) echo "$IPSEC_confreadstatus -- \`$1' aborted" | logger -s -p daemon.error -t ipsec_setup; - exit 1;; + exit 1 # generic error + ;; esac fi @@ -181,19 +201,39 @@ case "$1" in start|--start|stop|--stop|_autostop|_autostart) start_stop $1 + rc_failed $st + rc_status -v ;; restart|--restart|force-reload) restart_reload + rc_status + ;; + + reload|--reload) + rc_failed 3 + rc_status -v + ;; + + try-restart|condrestart|force-reload) + $0 status + if test $? = 0; then + $0 restart + else + rc_reset # Not running is not a failure. + fi + rc_status ;; _autorestart) # for internal use only autorestart + rc_status ;; status|--status) ipsec _realsetup $1 RETVAL=$? + rc_status -v ;; version|--version) @@ -207,7 +247,7 @@ *) echo "Usage: $me [ --showonly ] {--start|--stop|--restart}" echo " $me --status" - RETVAL=2 + rc_failed 2 esac -exit $RETVAL +rc_exit
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor