Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F56338759
routes.sh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
routes.sh
View Options
#!/bin/sh
# -------------------------------------------------------------
# Network — routes configuration for Linux systems
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# License: Trivial work, not eligible to copyright
# Source file: roles/core/network/files/Linux/routes.sh
# Dependencies: iproute
# GNU xargs for -r
# -------------------------------------------------------------
#
# <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>
ROUTES_CONFIG_PATH
=
/etc/routes.conf
# Runs as root only
test
-z
$UID
&&
UID
=
$(
id
-u
)
if
[
"
$UID
"
-ne
0
]
;
then
echo
This
script
must
be
run
as
root.
>
&
2
exit
1
fi
# Warn about configuration missing
if
[
!
-f
$ROUTES_CONFIG_PATH
]
;
then
echo
No
routes
configuration
file
found
at
$ROUTES_CONFIG_PATH
>
&
2
exit
2
fi
# Apply routes
# Ignore comments and blank line, pass the remaining lines to `ip route`
grep
'^[^#]'
$ROUTES_CONFIG_PATH
|
xargs
-L
1
-r
ip
route
replace
File Metadata
Details
Attached
Mime Type
text/x-shellscript
Expires
Sat, Nov 7, 04:58 (18 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3942713
Default Alt Text
routes.sh (1 KB)
Attached To
Mode
rOPS Nasqueron Operations
Attached
Detach File
Event Timeline
Log In to Comment