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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kristopher Ruzic
slapos.package
Commits
a3a5c3bc
Commit
a3a5c3bc
authored
Jul 29, 2013
by
Jondy Zhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos-cygwin-bootstrip:
add function show_usage add function check_os_is_wow64
parent
a9a9a49c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
22 deletions
+32
-22
windows/scripts/slapos-cygwin-bootstrip.sh
windows/scripts/slapos-cygwin-bootstrip.sh
+32
-22
No files found.
windows/scripts/slapos-cygwin-bootstrip.sh
View file @
a3a5c3bc
#! /bin/bash
#
# This script is used to build a bootstrip slapos in the cywin.
#
# Usage:
#
# ./slapos-cygwin-bootstrip.sh
#
# Before run this script, type the following command in the windows
# command console to install cygwin:
#
# setup_cygwin.bat C:\slapos-bootstrip network
#
# Then sign up slapos.org, got the following certificate files:
#
# certificate
# key
#
# computer.key
# computer.crt
#
# save them in your home path.
#
function
check_os_is_wow64
()
{
[[
$(
uname
)
==
CYGWIN_NT-
*
-WOW64
]]
}
readonly
-f
check_os_is_wow64
function
show_usage
()
{
echo
"This script is used to build a bootstrip slapos in the cywin."
echo
""
echo
"Usage:"
echo
""
echo
" ./slapos-cygwin-bootstrip.sh"
echo
""
echo
"Before run this script, type the following command in the windows"
echo
"command console to install cygwin:"
echo
""
echo
" setup_cygwin.bat C:
\s
lapos-bootstrip network"
echo
""
echo
"Then sign up slapos.org, got the following certificate files:"
echo
""
echo
" certificate"
echo
" key"
echo
" computer.key"
echo
" computer.crt"
echo
""
echo
"save them in your home path."
echo
""
}
readonly
-f
show_usage
export
PATH
=
/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin:
$PATH
if
!
source
/usr/share/csih/cygwin-service-installation-helper.sh
;
then
echo
"Error: Missing csih package."
...
...
@@ -97,7 +107,7 @@ for _cmdname in ip useradd usermod groupadd brctl tunctl ; do
done
if
[[
!
-x
/usr/bin/ipwin.exe
]]
;
then
if
[[
$(
uname
)
==
CYGWIN_NT-
*
-WOW64
]]
;
then
if
check_os_is_wow64
;
then
wget http://dashingsoft.com/products/slapos/ipwin_x64.exe
-O
/usr/bin/ipwin.exe
||
csih_error
"download ipwin_x64.exe failed"
csih_inform
"download ipwin_x64.exe OK"
...
...
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