Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Software
idms-linux-installer
Commits
54fbd38b
Commit
54fbd38b
authored
Oct 14, 2019
by
Nigel Kukard
Browse files
Use scope link when adding a gateway route
parent
60ca2467
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/idmslinux_installer/ili.py
View file @
54fbd38b
...
@@ -29,7 +29,7 @@ from idmslinux_installer.ilistate import IliState
...
@@ -29,7 +29,7 @@ from idmslinux_installer.ilistate import IliState
from
idmslinux_installer.plugin
import
PluginCollection
from
idmslinux_installer.plugin
import
PluginCollection
from
idmslinux_installer.util.blockdevices
import
BlockDevices
from
idmslinux_installer.util.blockdevices
import
BlockDevices
__version__
=
"0.1.
5
"
__version__
=
"0.1.
6
"
class
Ili
:
class
Ili
:
...
...
src/idmslinux_installer/plugins/config_system/systemd_networkd.py
View file @
54fbd38b
...
@@ -135,11 +135,13 @@ class ConfigSystemdNetworkd(Plugin):
...
@@ -135,11 +135,13 @@ class ConfigSystemdNetworkd(Plugin):
if
self
.
_outside_network4
(
config
,
'ipv4address'
,
'ipv4gateway'
):
if
self
.
_outside_network4
(
config
,
'ipv4address'
,
'ipv4gateway'
):
network_file
.
write
(
'
\n
[Route]
\n
'
)
network_file
.
write
(
'
\n
[Route]
\n
'
)
network_file
.
write
(
'Destination=%s
\n
'
%
config
[
'ipv4gateway'
])
network_file
.
write
(
'Destination=%s
\n
'
%
config
[
'ipv4gateway'
])
network_file
.
write
(
'Scope=link
\n
'
)
# If ipv6gateway is not within ipv6address's range, then add a route section
# If ipv6gateway is not within ipv6address's range, then add a route section
if
self
.
_outside_network6
(
config
,
'ipv6address'
,
'ipv6gateway'
):
if
self
.
_outside_network6
(
config
,
'ipv6address'
,
'ipv6gateway'
):
network_file
.
write
(
'
\n
[Route]
\n
'
)
network_file
.
write
(
'
\n
[Route]
\n
'
)
network_file
.
write
(
'Destination=%s
\n
'
%
config
[
'ipv6gateway'
])
network_file
.
write
(
'Destination=%s
\n
'
%
config
[
'ipv6gateway'
])
network_file
.
write
(
'Scope=link
\n
'
)
network_file
.
write
(
f
'
\n
'
)
network_file
.
write
(
f
'
\n
'
)
# Finally close the file
# Finally close the file
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment