diff options
author | Michael Mair-Keimberger (asterix) <m.mairkeimberger@gmail.com> | 2017-01-25 20:49:50 +0100 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2017-01-25 23:06:13 -0500 |
commit | d69a628145b8027fa256bdaf331d05608337c1b1 (patch) | |
tree | 9428f4fdf1d752d5446399832b448c3509c1e29e /net-misc/openconnect | |
parent | dev-python/flask-socketio: version bump to 2.8.2 (diff) | |
download | gentoo-d69a628145b8027fa256bdaf331d05608337c1b1.tar.gz gentoo-d69a628145b8027fa256bdaf331d05608337c1b1.tar.bz2 gentoo-d69a628145b8027fa256bdaf331d05608337c1b1.zip |
net-misc/openconnect: remove unused init files
Diffstat (limited to 'net-misc/openconnect')
-rw-r--r-- | net-misc/openconnect/files/openconnect.init.in-r2 | 144 | ||||
-rw-r--r-- | net-misc/openconnect/files/openconnect.init.in-r3 | 145 |
2 files changed, 0 insertions, 289 deletions
diff --git a/net-misc/openconnect/files/openconnect.init.in-r2 b/net-misc/openconnect/files/openconnect.init.in-r2 deleted file mode 100644 index 338afb8d1a6f..000000000000 --- a/net-misc/openconnect/files/openconnect.init.in-r2 +++ /dev/null @@ -1,144 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2014 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -VPN="${RC_SVCNAME#*.}" -VPNLOG="/var/log/openconnect/${VPN}" -VPNLOGFILE="${VPNLOG}/openconnect.log" -VPNERRFILE="${VPNLOG}/openconnect.err" -VPNPID="/run/openconnect/${VPN}.pid" -VPNDIR="/etc/openconnect/${VPN}" -PREUPSCRIPT="${VPNDIR}/preup.sh" -PREDOWNSCRIPT="${VPNDIR}/predown.sh" -POSTUPSCRIPT="${VPNDIR}/postup.sh" -POSTDOWNSCRIPT="${VPNDIR}/postdown.sh" -SERVER="server_${VPN}" -PASSWORD="password_${VPN}" -VPNOPTS="vpnopts_${VPN}" - -depend() { - before netmount -} - -checkconfig() { - if [ $VPN = "openconnect" ]; then - eerror "You cannot call openconnect directly. You must create a symbolic link to it with the vpn name:" - echo - eerror "ln -s /etc/init.d/openconnect /etc/init.d/openconnect.vpn0" - echo - eerror "And then call it instead:" - echo - eerror "/etc/init.d/openconnect.vpn0 start" - return 1 - fi -} - -checktuntap() { - if [ $(uname -s) = "Linux" ] ; then - if [ ! -e /dev/net/tun ]; then - if ! modprobe tun ; then - eerror "TUN/TAP support is not available in this kernel" - return 1 - fi - fi - if [ -h /dev/net/tun ] && [ -c /dev/misc/net/tun ]; then - ebegin "Detected broken /dev/net/tun symlink, fixing..." - rm -f /dev/net/tun - ln -s /dev/misc/net/tun /dev/net/tun - eend $? - fi - fi -} - -start() { - ebegin "Starting OpenConnect: ${VPN}" - - local tmp_SERVER tmp_VPNOPTS tmp_PASSWORD - eval tmp_SERVER="\${${SERVER}}" - eval tmp_VPNOPTS="\${${VPNOPTS}}" - eval tmp_PASSWORD="\${${PASSWORD}}" - - checkconfig || return 1 - - checktuntap || return 1 - - if [ "${tmp_SERVER}" = "vpn.server.tld" ]; then - eend 1 "${VPN} not configured" - return 1 - fi - - if [ ! -e "${VPNLOG}" ]; then - mkdir -p "${VPNLOG}" - fi - - local piddir="${VPNPID%/*}" - if [ ! -d "$piddir" ] ; then - mkdir -p "$piddir" - if [ $? -ne 0 ]; then - eerror "Directory $piddir for pidfile does not exist and cannot be created" - return 1 - fi - fi - - if [ -x "${PREUPSCRIPT}" ] ; then - "${PREUPSCRIPT}" - fi - - start-stop-daemon --start \ - --make-pidfile \ - --pidfile "${VPNPID}" \ - --stderr "${VPNERRFILE}" \ - --stdout "${VPNLOGFILE}" \ - --background \ - --exec /usr/sbin/openconnect -- \ - --interface="${VPN}" \ - --pid-file="${VPNPID}" \ - ${tmp_VPNOPTS} \ - ${tmp_SERVER} <<-E - ${tmp_PASSWORD} - E - - local retval=$? - - if [ ! ${retval} -eq 0 ]; then - eend ${retval} - return ${retval} - fi - - if [ -x "${POSTUPSCRIPT}" ] ; then - # wait until the interface is up and an ip address is set before running postup - while true; do - if [ -n "$(ip addr show $VPN | grep inet)" ]; then - "${POSTUPSCRIPT}" - break - fi - done - fi - - eend $? -} - -stop() { - ebegin "Stopping OpenConnect: ${VPN}" - - checkconfig || return 1 - - if [ -x "${PREDOWNSCRIPT}" ] ; then - "${PREDOWNSCRIPT}" - fi - - start-stop-daemon --pidfile "${VPNPID}" --stop /usr/sbin/openconnect - local retval=$? - - if [ ! ${retval} -eq 0 ]; then - eend ${retval} - return ${retval} - fi - - - if [ -x "${POSTDOWNSCRIPT}" ] ; then - "${POSTDOWNSCRIPT}" - fi - eend $? -} diff --git a/net-misc/openconnect/files/openconnect.init.in-r3 b/net-misc/openconnect/files/openconnect.init.in-r3 deleted file mode 100644 index daaec8e9b150..000000000000 --- a/net-misc/openconnect/files/openconnect.init.in-r3 +++ /dev/null @@ -1,145 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2014 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -VPN="${RC_SVCNAME#*.}" -VPNLOG="/var/log/openconnect/${VPN}" -VPNLOGFILE="${VPNLOG}/openconnect.log" -VPNERRFILE="${VPNLOG}/openconnect.err" -VPNPID="/run/openconnect/${VPN}.pid" -VPNDIR="/etc/openconnect/${VPN}" -PREUPSCRIPT="${VPNDIR}/preup.sh" -PREDOWNSCRIPT="${VPNDIR}/predown.sh" -POSTUPSCRIPT="${VPNDIR}/postup.sh" -POSTDOWNSCRIPT="${VPNDIR}/postdown.sh" -SERVER="server_${VPN}" -PASSWORD="password_${VPN}" -VPNOPTS="vpnopts_${VPN}" - -depend() { - before netmount -} - -checkconfig() { - if [ $VPN = "openconnect" ]; then - eerror "You cannot call openconnect directly. You must create a symbolic link to it with the vpn name:" - echo - eerror "ln -s /etc/init.d/openconnect /etc/init.d/openconnect.vpn0" - echo - eerror "And then call it instead:" - echo - eerror "/etc/init.d/openconnect.vpn0 start" - return 1 - fi -} - -checktuntap() { - if [ $(uname -s) = "Linux" ] ; then - if [ ! -e /dev/net/tun ]; then - if ! modprobe tun ; then - eerror "TUN/TAP support is not available in this kernel" - return 1 - fi - fi - if [ -h /dev/net/tun ] && [ -c /dev/misc/net/tun ]; then - ebegin "Detected broken /dev/net/tun symlink, fixing..." - rm -f /dev/net/tun - ln -s /dev/misc/net/tun /dev/net/tun - eend $? - fi - fi -} - -start() { - ebegin "Starting OpenConnect: ${VPN}" - - local tmp_SERVER tmp_VPNOPTS tmp_PASSWORD - eval tmp_SERVER="\${${SERVER}}" - eval tmp_VPNOPTS="\${${VPNOPTS}}" - eval tmp_PASSWORD="\${${PASSWORD}}" - - checkconfig || return 1 - - checktuntap || return 1 - - if [ "${tmp_SERVER}" = "vpn.server.tld" ]; then - eend 1 "${VPN} not configured" - return 1 - fi - - if [ ! -e "${VPNLOG}" ]; then - mkdir -p "${VPNLOG}" - fi - - local piddir="${VPNPID%/*}" - if [ ! -d "$piddir" ] ; then - mkdir -p "$piddir" - if [ $? -ne 0 ]; then - eerror "Directory $piddir for pidfile does not exist and cannot be created" - return 1 - fi - fi - - if [ -x "${PREUPSCRIPT}" ] ; then - "${PREUPSCRIPT}" - fi - - start-stop-daemon --start \ - --make-pidfile \ - --pidfile "${VPNPID}" \ - --stderr "${VPNERRFILE}" \ - --stdout "${VPNLOGFILE}" \ - --background \ - --exec /usr/sbin/openconnect -- \ - --interface="${VPN}" \ - --pid-file="${VPNPID}" \ - ${tmp_VPNOPTS} \ - ${tmp_SERVER} <<-E - ${tmp_PASSWORD} - E - - local retval=$? - - if [ ! ${retval} -eq 0 ]; then - eend ${retval} - return ${retval} - fi - - if [ -x "${POSTUPSCRIPT}" ] ; then - # wait until the interface is up and an ip address is set before running postup - while true; do - sleep 0.5 - if [ -n "$(ip addr show $VPN 2> /dev/null | grep inet)" ]; then - "${POSTUPSCRIPT}" - break - fi - done - fi - - eend $? -} - -stop() { - ebegin "Stopping OpenConnect: ${VPN}" - - checkconfig || return 1 - - if [ -x "${PREDOWNSCRIPT}" ] ; then - "${PREDOWNSCRIPT}" - fi - - start-stop-daemon --pidfile "${VPNPID}" --stop /usr/sbin/openconnect - local retval=$? - - if [ ! ${retval} -eq 0 ]; then - eend ${retval} - return ${retval} - fi - - - if [ -x "${POSTDOWNSCRIPT}" ] ; then - "${POSTDOWNSCRIPT}" - fi - eend $? -} |