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
Kasra Jamshidi
slapos.package
Commits
f3647964
Commit
f3647964
authored
Apr 26, 2013
by
Jondy Zhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
No check devcon/cscript when tap has been installed;
Add publish=yes when adding route.
parent
62333501
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
windows/scripts/ip
windows/scripts/ip
+8
-6
No files found.
windows/scripts/ip
View file @
f3647964
...
@@ -324,10 +324,8 @@ function install_tap_driver()
...
@@ -324,10 +324,8 @@ function install_tap_driver()
{
{
local
FILENAME
=
"/etc/openvpn/driver/OemWin2k.inf"
local
FILENAME
=
"/etc/openvpn/driver/OemWin2k.inf"
local
DEVFILE
=
$(
cygpath
-w
$FILENAME
)
local
DEVFILE
=
$(
cygpath
-w
$FILENAME
)
local
DEVCON
=
$(
which devcon.exe
)
local
HWID
=
tap0901
local
HWID
=
tap0901
local
CHECKSCRIPT
=
$(
cygpath
-m
/etc/openvpn/check_driver_signing_dialog.vbs
)
local
CHECKSCRIPT
=
$(
cygpath
-m
/etc/openvpn/check_driver_signing_dialog.vbs
)
local
CSCRIPT
=
$(
which cscript
)
local
GETSCRIPT
=
$(
cygpath
-m
/etc/openvpn/get_last_connection.vbs
)
local
GETSCRIPT
=
$(
cygpath
-m
/etc/openvpn/get_last_connection.vbs
)
# check if ifname has been installed
# check if ifname has been installed
...
@@ -344,11 +342,13 @@ function install_tap_driver()
...
@@ -344,11 +342,13 @@ function install_tap_driver()
return
1
return
1
fi
fi
local
DEVCON
=
$(
which devcon.exe
)
if
[[
!
-x
$DEVCON
]]
;
then
if
[[
!
-x
$DEVCON
]]
;
then
echo
"Error: no devcon.exe found"
echo
"Error: no devcon.exe found"
return
1
return
1
fi
fi
local
CSCRIPT
=
$(
which cscript.exe
)
if
[[
!
-x
$CSCRIPT
]]
;
then
if
[[
!
-x
$CSCRIPT
]]
;
then
echo
"Error: no cscript.exe found"
echo
"Error: no cscript.exe found"
return
1
return
1
...
@@ -425,7 +425,7 @@ function uninstall_tap_driver()
...
@@ -425,7 +425,7 @@ function uninstall_tap_driver()
local
DEVCON
=
$(
which devcon.exe
)
local
DEVCON
=
$(
which devcon.exe
)
local
CSCRIPT
=
$(
which cscript.exe
)
local
CSCRIPT
=
$(
which cscript.exe
)
local
GETSCRIPT
=
$(
cygpath
-m
/etc/openvpn/get_pnpid_connection.vbs
)
local
GETSCRIPT
=
$(
cygpath
-m
/etc/openvpn/get_pnpid_connection.vbs
)
if
[[
"
$1
"
==
""
]]
;
then
if
[[
"
$1
"
==
""
]]
;
then
echo
"Error: missing connection name"
echo
"Error: missing connection name"
return
1
return
1
...
@@ -721,7 +721,7 @@ elif [[ $object == "route" ]] ; then
...
@@ -721,7 +721,7 @@ elif [[ $object == "route" ]] ; then
if
[[
"
$opt_family
"
==
"ipv4"
||
"
$opt_family
"
==
""
]]
;
then
if
[[
"
$opt_family
"
==
"ipv4"
||
"
$opt_family
"
==
""
]]
;
then
# rtmroute need that the Routing and Remote Access Service is running
# rtmroute need that the Routing and Remote Access Service is running
ipcmd
=
"netsh routing ip
$command
rtmroute"
# ipcmd="netsh routing ip $command rtmroute"
# ipcmd="netsh routing ip $command persistentroute"
# ipcmd="netsh routing ip $command persistentroute"
if
[[
$command
==
"list"
]]
;
then
if
[[
$command
==
"list"
]]
;
then
route print
route print
...
@@ -733,12 +733,14 @@ elif [[ $object == "route" ]] ; then
...
@@ -733,12 +733,14 @@ elif [[ $object == "route" ]] ; then
mask
=
$(
prefix_to_netmask
$(
basename
$prefix
))
mask
=
$(
prefix_to_netmask
$(
basename
$prefix
))
ipcmd
=
"route
$command
$address
MASK
$mask
$nexthop
"
ipcmd
=
"route
$command
$address
MASK
$mask
$nexthop
"
elif
[[
"
$opt_family
"
==
"ipv6"
]]
;
then
elif
[[
"
$opt_family
"
==
"ipv6"
]]
;
then
if
[[
$command
==
"list"
]]
;
then
if
[[
$command
==
"add"
]]
;
then
publish
=
"publish=yes"
elif
[[
$command
==
"list"
]]
;
then
command
=
"show"
command
=
"show"
elif
[[
$command
==
"change"
]]
;
then
elif
[[
$command
==
"change"
]]
;
then
command
=
"set"
command
=
"set"
fi
fi
ipcmd
=
"netsh interface ipv6
$command
route
$prefix
\"
$interface
\"
$nexthop
"
ipcmd
=
"netsh interface ipv6
$command
route
$prefix
\"
$interface
\"
$nexthop
$publish
"
else
else
echo
$orig_cmd
echo
$orig_cmd
echo
"Error: unsupported family
\"
$opt_family
\"
"
echo
"Error: unsupported family
\"
$opt_family
\"
"
...
...
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