Accepting request 211245 from home:mtomaschewski:branches:network:vpn

- Readded rcopenvpn helper script under systemd (bnc#848070)
- Fixed a typo

OBS-URL: https://build.opensuse.org/request/show/211245
OBS-URL: https://build.opensuse.org/package/show/network:vpn/openvpn?expand=0&rev=69
This commit is contained in:
2013-12-22 15:48:48 +00:00
committed by Git OBS Bridge
parent 3e9aee291c
commit fcd74cd7cf
3 changed files with 45 additions and 1 deletions

37
rcopenvpn Normal file
View File

@@ -0,0 +1,37 @@
#! /bin/bash
SYSTEMD_NO_WRAP=1 . /etc/rc.status
rc_reset
action=$1 ; shift
config=$1 ; shift
if test -n "$config" ; then
systemctl "${action}" "openvpn@${config}.service"
else
case $action in
status)
n=0
l=`systemctl show -p ConsistsOf openvpn.target 2>/dev/null`
for s in ${l#ConsistsOf=} ; do
case $s in
openvpn@*.service)
systemctl status "$s"
rc_check
((++n))
;;
esac
done
if test $n -gt 0 ; then
rc_status
else
rc_status -u
fi
;;
*)
systemctl "${action}" "openvpn.target"
;;
esac
fi
rc_exit