Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.package
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xiaowu Zhang
slapos.package
Commits
1f0c965f
Commit
1f0c965f
authored
Sep 17, 2013
by
Jondy Zhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos-configure.sh: fix ipv4 addr can't be assigned to netcard
parent
03fd75a8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
windows/scripts/slapos-configure.sh
windows/scripts/slapos-configure.sh
+2
-2
windows/scripts/slapos-include.sh
windows/scripts/slapos-include.sh
+2
-2
No files found.
windows/scripts/slapos-configure.sh
View file @
1f0c965f
...
...
@@ -233,7 +233,7 @@ function configure_section_network()
csih_error
"install network interface
${
slapos_ifname
}
failed"
fi
_addr4
=
$(
echo
${
_ipv4_local_network
}
|
sed
-e
"s%
\.
0/%.1/%g"
)
if
[[
-n
"
${
_addr
}
"
]]
;
then
if
[[
-n
"
${
_addr
4
}
"
]]
;
then
netsh interface ip show addr
${
slapos_ifname
}
|
grep
-q
"
${
_addr4
}
"
||
ip
-4
addr add
${
_addr4
}
dev
${
slapos_ifname
}
||
csih_error
"add ipv4 address failed"
...
...
@@ -743,7 +743,7 @@ while test $# -gt 0; do
done
if
[[
-z
"
${
_ipv4_local_network
}
"
]]
;
then
_ipv4_local_network
=
$(
get_free_local_ipv4_network
)
.0/24
||
_ipv4_local_network
=
$(
get_free_local_ipv4_network
)
||
csih_error
"no ipv4_local_network specified"
fi
...
...
windows/scripts/slapos-include.sh
View file @
1f0c965f
...
...
@@ -183,7 +183,7 @@ function reset_slapos_connection()
# ======================================================================
# Routine: get_free_local_ipv4_network
# Get a free local ipv4 network in 10.x.x.0/24, return 10.x.x
# Get a free local ipv4 network in 10.x.x.0/24, return 10.x.x
.0/24
# ======================================================================
function
get_free_local_ipv4_network
()
{
...
...
@@ -204,7 +204,7 @@ function get_free_local_ipv4_network()
addr
=
${
seg1
}
.
${
seg2
}
!
IPCONFIG /ALL |
grep
-q
${
addr
}
&&
echo
10.
${
addr
}
&&
echo
"10.
${
addr
}
.0/24"
&&
return
0
let
i--
...
...
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