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
Ivan Tyagov
slapos.package
Commits
1510a838
Commit
1510a838
authored
Jun 27, 2013
by
Jondy Zhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix no guid of network connection in the Windows 7
parent
007fb44a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
windows/scripts/ip
windows/scripts/ip
+7
-2
windows/scripts/slapos-node-config.sh
windows/scripts/slapos-node-config.sh
+2
-3
No files found.
windows/scripts/ip
View file @
1510a838
...
@@ -308,8 +308,13 @@ function format_interface_name()
...
@@ -308,8 +308,13 @@ function format_interface_name()
if
!
[[
"
${
guid
:0:1
}
"
==
"{"
]]
;
then
if
!
[[
"
${
guid
:0:1
}
"
==
"{"
]]
;
then
echo
$1
echo
$1
else
else
ipv6
if
|
grep
-B1
"
${
guid
}
"
|
\
which ipv6
>
/dev/null 2>&1
sed
-e
"2d"
-e
"s/^Interface[0-9: ]
\+\(
Ethernet:
\)\?
//g"
if
((
$?
))
;
then
getmac /fo list /v |
grep
-B3
"^Transport Name:.*
$guid
"
|
grep
"^Connection Name:"
|
sed
-e
"s/^Connection Name: *//g"
else
ipv6
if
|
grep
-B1
"
${
guid
}
"
|
\
sed
-e
"2d"
-e
"s/^Interface[0-9: ]
\+\(
Ethernet:
\)\?
//g"
fi
fi
fi
}
}
...
...
windows/scripts/slapos-node-config.sh
View file @
1510a838
...
@@ -73,9 +73,8 @@ function reset_connection()
...
@@ -73,9 +73,8 @@ function reset_connection()
function
connection2guid
()
function
connection2guid
()
{
{
ifname
=
${
1
-re6stnet-lo
}
ifname
=
${
1
-re6stnet-lo
}
netsh interface ipv6 show interface
$ifname
|
\
getmac /fo list /v |
grep
-A3
"^Connection Name: *
$ifname
\$
"
\
grep
"^GUID
\s
*:"
|
\
|
grep
"^Transport Name:"
|
sed
-e
"s/^.*Tcpip_//g"
sed
-e
"s/^GUID
\s
*:
\s
*//"
}
}
#
#
...
...
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