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
Klaus Wölfel
slapos.package
Commits
3512ee0a
Commit
3512ee0a
authored
Jul 04, 2013
by
Jondy Zhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show error and exit when run post-install script
parent
f52dbd09
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
windows/scripts/post-install.sh
windows/scripts/post-install.sh
+12
-6
No files found.
windows/scripts/post-install.sh
View file @
3512ee0a
...
...
@@ -3,7 +3,7 @@
# When cygwin is installed, then call this script by Administrator:
#
# /bin/bash/ --login -i init-cygwin.sh
#
#
# It will do:
#
# * Set uid of Adminstrator to 0, and create root account
...
...
@@ -13,12 +13,19 @@
# * Create autorebase.bat, it used to fix cygwin dll problem
#
# * Change readme.txt to dos format
#
#
function
show_error_exit
()
{
echo
Error:
$1
read
-n
1
-p
"Press any key to exit..."
exit
1
}
password_filename
=
/etc/passwd
echo
Checking passwd file ...
if
[[
!
-f
$password_filename
]]
;
then
echo
No passwd file found.
mkpasswd
>
$password_filename
mkpasswd
-l
>
$password_filename
||
show_error_exit
"mkpasswd failed"
echo
Generate passwd file OK.
else
echo
Check passwd file OK.
...
...
@@ -27,7 +34,7 @@ fi
echo
Checking group file ...
if
[[
!
-f
/etc/group
]]
;
then
echo
No group file found.
mkgroup
>
/etc/group
mkgroup
-l
>
/etc/group
||
show_error_exit
"mkgroup failed"
echo
Generate group file OK.
else
echo
Check group file OK.
...
...
@@ -96,7 +103,7 @@ fi
# installed in this computer.
for
x
in
$(
cygrunsrv
--list
)
;
do
echo
Removing cygservice
$x
cygrunsrv
-R
$x
cygrunsrv
-R
$x
done
# Backup slap-runner.html
...
...
@@ -105,4 +112,3 @@ cp /etc/slapos/scripts/slap-runner.html{,.orig}
echo
Run post-install script successfully.
read
-n
1
-t
60
-p
"Press any key to exit..."
exit
0
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