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
Boxiang Sun
slapos.package
Commits
adb3b947
Commit
adb3b947
authored
Aug 01, 2013
by
Jondy Zhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos-configure doesn't install tap-windows driver
ip command support tuntap to install tap-windows driver
parent
35ffb80c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
43 deletions
+26
-43
windows/scripts/ip
windows/scripts/ip
+1
-5
windows/scripts/slapos-configure.sh
windows/scripts/slapos-configure.sh
+25
-38
No files found.
windows/scripts/ip
View file @
adb3b947
...
...
@@ -659,11 +659,7 @@ elif [[ $object == "route" ]] ; then
exit
1
fi
elif
[[
$object
==
"tuntap"
]]
;
then
echo
$orig_cmd
exit
0
elif
[[
$object
==
"vpntap"
]]
;
then
elif
[[
$object
==
"vpntap"
||
$object
==
"tuntap"
]]
;
then
while
[[
"
$1
"
!=
""
]]
;
do
case
$1
in
...
...
windows/scripts/slapos-configure.sh
View file @
adb3b947
...
...
@@ -52,7 +52,6 @@ function show_usage()
echo
""
echo
" * All the configure item"
echo
" re6stnet Install re6stent and dependencies"
echo
" taps Install OpenVPN Tap-Windows Driver for re6stnet"
echo
" config Generate slapos node and client configure files"
echo
" cron Generate cron file and start cron job"
echo
""
...
...
@@ -475,18 +474,6 @@ if [[ ! -r ${re6stnet_configure_file} ]] ; then
>>
${
re6stnet_configure_file
}
fi
csih_inform
"Configure section re6stnet OK"
echo
""
# -----------------------------------------------------------
# taps: Install openvpn tap-windows drivers used by re6stnet
# -----------------------------------------------------------
#
# Adding tap-windows driver will break others, so we add all drivers
# here. Get re6stnet client count, then remove extra drivers and add
# required drivers.
csih_inform
"Starting configure section taps ..."
if
check_re6stnet_needed
;
then
csih_inform
"Disable IPv6 6to4 interface ... "
netsh interface ipv6 6to4
set
state disable
&&
csih_inform
"OK."
...
...
@@ -495,29 +482,29 @@ if check_re6stnet_needed ; then
csih_inform
"Disable IPv6 teredo interface ... "
netsh interface teredo
set
state disable
&&
csih_inform
"OK."
_count
=
$(
sed
-n
-e
"s/^client-count *//p"
${
re6stnet_configure_file
}
)
[[
-z
"
${
_count
}
"
]]
&&
_count
=
10
csih_inform
"re6stnet client-count:
${
_count
}
"
_name_list
=
"re6stnet-tcp re6stnet-udp"
for
((
i
=
1
;
i<
=
${
_count
}
;
i
=
i+1
))
;
do
_name_list
=
"
${
_name_list
}
re6stnet
$i
"
done
_filename
=
$(
cygpath
-w
${
openvpn_tap_driver_inf
}
)
for
_name
in
${
_name_list
}
;
do
csih_inform
"checking interface
${
_name
}
..."
if
!
netsh interface ipv6 show interface |
grep
-q
"
\\
b
${
_name
}
\\
b"
;
then
[[
-r
${
openvpn_tap_driver_inf
}
]]
||
csih_error
"Failed to install OpenVPN Tap-Windows Driver, missing driver inf file:
${
_filename
}
"
csih_inform
"installing interface
${
_name
}
..."
# ipwin install \"${_filename}\" $openvpn_tap_driver_hwid ${_name}; ||
ip vpntap add dev
${
_name
}
||
csih_error
"Failed to install OpenVPN Tap-Windows Driver."
csih_inform
"interface
${
_name
}
installed."
else
csih_inform
"
${
_name
}
has been installed."
fi
done
#
_count=$(sed -n -e "s/^client-count *//p" ${re6stnet_configure_file})
#
[[ -z "${_count}" ]] && _count=10
#
csih_inform "re6stnet client-count: ${_count}"
#
_name_list="re6stnet-tcp re6stnet-udp"
#
for (( i=1; i<=${_count}; i=i+1 )) ; do
#
_name_list="${_name_list} re6stnet$i"
#
done
#
_filename=$(cygpath -w ${openvpn_tap_driver_inf})
#
for _name in ${_name_list} ; do
#
csih_inform "checking interface ${_name} ..."
#
if ! netsh interface ipv6 show interface | grep -q "\\b${_name}\\b" ; then
#
[[ -r ${openvpn_tap_driver_inf} ]] ||
#
csih_error "Failed to install OpenVPN Tap-Windows Driver, missing driver inf file: ${_filename}"
#
csih_inform "installing interface ${_name} ..."
#
# ipwin install \"${_filename}\" $openvpn_tap_driver_hwid ${_name}; ||
#
ip vpntap add dev ${_name} ||
#
csih_error "Failed to install OpenVPN Tap-Windows Driver."
#
csih_inform "interface ${_name} installed."
#
else
#
csih_inform "${_name} has been installed."
#
fi
#
done
# Run re6stnet if no native ipv6
check_re6stnet_configure
||
...
...
@@ -546,11 +533,11 @@ else
csih_request
"native IPv6 found, no taps required."
fi
csih_inform
"Configure section
taps
OK"
csih_inform
"Configure section
re6stnet
OK"
echo
""
# -----------------------------------------------------------
#
tab
: Install cron service and create crontab
#
cron
: Install cron service and create crontab
# -----------------------------------------------------------
csih_inform
"Starting configure section cron ..."
...
...
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