Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Config
Commits
b1dc0234
Commit
b1dc0234
authored
Jan 30, 2018
by
Igor Pecovnik
Browse files
Fix DHCP / static handling
parent
4f6131bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
debian-config-submenu
View file @
b1dc0234
...
@@ -94,11 +94,9 @@ function create_if_config() {
...
@@ -94,11 +94,9 @@ function create_if_config() {
gateway
=
$(
route
-n
|
grep
'UG[ \t]'
|
awk
'{print $2}'
|
sed
-n
'1p'
)
gateway
=
$(
route
-n
|
grep
'UG[ \t]'
|
awk
'{print $2}'
|
sed
-n
'1p'
)
echo
-e
"# armbian-config created"
echo
-e
"# armbian-config created"
echo
-e
"source /etc/network/interfaces.d/*
\n
"
echo
-e
"source /etc/network/interfaces.d/*
\n
"
echo
-e
"# Local loopback
\n
auto lo
\n
iface lo init loopback
\n
"
if
[[
"
$3
"
==
"fixed"
]]
;
then
echo
-e
"# Interface
$2
\n
allow-hotplug
$2
\n
no-auto-down
$2
"
echo
-e
"# Local loopback
\n
auto lo
\n
iface lo init loopback
\n
"
if
[[
"
$3
"
!=
"fixed"
]]
;
then
echo
-e
"# Interface
$2
\n
allow-hotplug
$2
\n
no-auto-down
$2
"
echo
-e
"iface
$2
inet dhcp"
else
echo
-e
"iface
$2
inet static
\n\t
address
$address
\n\t
netmask
$netmask
\n\t
gateway
$gateway
\n\t
dns-nameservers 8.8.8.8"
echo
-e
"iface
$2
inet static
\n\t
address
$address
\n\t
netmask
$netmask
\n\t
gateway
$gateway
\n\t
dns-nameservers 8.8.8.8"
fi
fi
}
#
}
#
...
...
Write
Preview
Markdown
is supported
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