#!/sbin/openrc-run # Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 command="/usr/bin/vde_switch" pidfile="/run/vde_switch.pid" command_args="--pidfile=${pidfile} --tap=${VDE_TAP} --group=${VDE_GROUP} --mode=660 --dirmode=770 ${VDE_OPTS}" command_args_background="--daemon" depend() { after net.${VDE_TAP} } start_pre() { [ "${VDE_MODPROBE_TUN}" = "yes" ] && modprobe tun } stop_post() { [ "${VDE_MODPROBE_TUN}" = "yes" ] && modprobe --quiet --remove tun # Don't fail to stop the service if the "tun" module in use # and the above "modprobe -r" command fails. return 0 }