Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F53428495
route-drake.service
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
route-drake.service
View Options
#!/bin/sh
# PROVIDE: route-drake
# REQUIRE: NETWORKING
# -------------------------------------------------------------
# Static route service
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# License: Trivial work, not eligible to copyright
# Source file: roles/core/network/files/FreeBSD/route-drake.service
# -------------------------------------------------------------
#
# <auto-generated>
# This file is managed by our rOPS SaltStack repository.
#
# Changes to this file may cause incorrect behavior
# and will be lost if the state is redeployed.
# </auto-generated>
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# route_drake_enable (bool): Set it to YES to enable routing.
# Default is "NO".
# route_drake_range (str): CIDR range to route
# Default is "172.27.27.0/24".
# route_drake_destination (str): gateway IP for that route
# Default is "172.27.27.1".
. /etc/rc.subr
name=route_drake
rcvar=route_drake_enable
load_rc_config $name
# All the network served through the GRE tunnel + the tunnel endpoint
: ${route_drake_enable:="NO"}
: ${route_drake_range:="172.27.27.0/24"}
: ${route_drake_destination:="172.27.27.1"}
stop_cmd=":"
start_cmd="route_drake_start"
route_drake_start()
{
sleep 30
if netstat -rn | grep -q $route_drake_range; then
exit 0
else
route add -net $route_drake_range $route_drake_destination
fi
}
run_rc_command "$1"
File Metadata
Details
Attached
Mime Type
text/x-shellscript
Expires
Sun, Oct 11, 21:08 (45 m, 8 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4164641
Default Alt Text
route-drake.service (1 KB)
Attached To
Mode
rOPS Nasqueron Operations
Attached
Detach File
Event Timeline
Log In to Comment