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
c1f1528f
Commit
c1f1528f
authored
Jul 10, 2013
by
Jondy Zhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't report error when add an existed ip address
parent
5a82707c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
13 deletions
+22
-13
windows/scripts/ip
windows/scripts/ip
+21
-11
windows/scripts/post-install.sh
windows/scripts/post-install.sh
+1
-2
No files found.
windows/scripts/ip
View file @
c1f1528f
...
@@ -463,17 +463,6 @@ elif [[ $object == "addr" ]] ; then
...
@@ -463,17 +463,6 @@ elif [[ $object == "addr" ]] ; then
exit
1
exit
1
fi
fi
if
[[
"
$opt_family
"
==
"ipv4"
||
"
$opt_family
"
==
""
]]
;
then
ipcmd
=
"netsh interface ip
$command
address"
address
=
"
$address
$mask
"
elif
[[
"
$opt_family
"
==
"ipv6"
]]
;
then
ipcmd
=
"netsh interface ipv6
$command
address"
else
echo
$orig_cmd
echo
"Error: unsupported family
\"
$opt_family
\"
"
exit
1
fi
while
[[
"
$1
"
!=
""
]]
;
do
while
[[
"
$1
"
!=
""
]]
;
do
case
$1
in
case
$1
in
dev
)
dev
)
...
@@ -486,6 +475,26 @@ elif [[ $object == "addr" ]] ; then
...
@@ -486,6 +475,26 @@ elif [[ $object == "addr" ]] ; then
shift
shift
done
done
if
[[
"
$opt_family
"
==
"ipv4"
||
"
$opt_family
"
==
""
]]
;
then
if
[[
"
$command
"
==
"add"
]]
;
then
netsh interface ip show address
\"
$dev
\"
|
grep
-q
-F
$address
&&
exit
0
fi
ipcmd
=
"netsh interface ip
$command
address"
address
=
"
$address
$mask
"
elif
[[
"
$opt_family
"
==
"ipv6"
]]
;
then
if
[[
"
$command
"
==
"add"
]]
;
then
netsh interface ipv6 show address
\"
$dev
\"
level
=
normal |
\
grep
-q
-F
$address
&&
exit
0
fi
ipcmd
=
"netsh interface ipv6
$command
address"
else
echo
$orig_cmd
echo
"Error: unsupported family
\"
$opt_family
\"
"
exit
1
fi
ipcmd
=
"
$ipcmd
\"
$dev
\"
$address
"
ipcmd
=
"
$ipcmd
\"
$dev
\"
$address
"
elif
[[
$object
==
"addrlabel"
]]
;
then
elif
[[
$object
==
"addrlabel"
]]
;
then
...
@@ -513,6 +522,7 @@ elif [[ $object == "addrlabel" ]] ; then
...
@@ -513,6 +522,7 @@ elif [[ $object == "addrlabel" ]] ; then
fi
fi
if
[[
$command
==
"add"
]]
;
then
if
[[
$command
==
"add"
]]
;
then
netsh interface ipv6 show prefixpolicies |
grep
-q
-F
$prefix
&&
exit
0
ipcmd
=
"
$ipcmd
$command
prefixpolicy
$prefix
$precedence
$label
"
ipcmd
=
"
$ipcmd
$command
prefixpolicy
$prefix
$precedence
$label
"
else
else
ipcmd
=
"
$ipcmd
$command
prefixpolicy
$prefix
"
ipcmd
=
"
$ipcmd
$command
prefixpolicy
$prefix
"
...
...
windows/scripts/post-install.sh
View file @
c1f1528f
...
@@ -53,10 +53,9 @@ echo Checking Windows OEM Codepage ...
...
@@ -53,10 +53,9 @@ echo Checking Windows OEM Codepage ...
_charset
=
$(
ipwin codepage
)
||
_charset
=
""
_charset
=
$(
ipwin codepage
)
||
_charset
=
""
echo
Windows OEM Codepage is
${
_charset
}
echo
Windows OEM Codepage is
${
_charset
}
_filename
=
"
~/
.minttyrc"
_filename
=
".minttyrc"
echo
Checking
${
_filename
}
...
echo
Checking
${
_filename
}
...
if
[[
!
-f
${
_filename
}
]]
;
then
if
[[
!
-f
${
_filename
}
]]
;
then
echo
Creating
${
_filename
}
cat
<<
EOF
>
${
_filename
}
cat
<<
EOF
>
${
_filename
}
BoldAsFont=no
BoldAsFont=no
Font=Courier New
Font=Courier New
...
...
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