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
Lisa Casino
slapos.package
Commits
5b2307cc
Commit
5b2307cc
authored
Mar 29, 2013
by
Marco Mariani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
typo, spacing, style
parent
7f05bbf5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
slapprepare/slapprepare/script/slapos_firstboot
slapprepare/slapprepare/script/slapos_firstboot
+7
-7
No files found.
slapprepare/slapprepare/script/slapos_firstboot
View file @
5b2307cc
...
...
@@ -40,13 +40,13 @@ import tempfile
import
time
# some constants
LABEL
=
"SLAPOS"
MINIMUM_FREE_SPACE_GB
=
60
MINIMUM_FREE_SPACE
=
MINIMUM_FREE_SPACE_GB
*
1024
*
1024
*
1024
SLAPOS_MARK
=
'# Added by SlapOS
\
n
'
LABEL
=
"SLAPOS"
MINIMUM_FREE_SPACE_GB
=
60
MINIMUM_FREE_SPACE
=
MINIMUM_FREE_SPACE_GB
*
1024
*
1024
*
1024
SLAPOS_MARK
=
'# Added by SlapOS
\
n
'
def
callWithCheck
(
args
):
"""Calls args in subprocesses, ra
si
es ValueError if command failed"""
"""Calls args in subprocesses, ra
is
es ValueError if command failed"""
if
subprocess
.
call
(
args
)
!=
0
:
raise
ValueError
...
...
@@ -126,7 +126,7 @@ def prepareSlapOSPartition(mount_point):
"""Prepare SlapOS partitioning"""
new_fstab
=
open
(
'/etc/fstab'
,
'r'
).
readlines
()
a
=
new_fstab
.
append
d
=
dict
(
label
=
LABEL
)
d
=
{
'label'
:
LABEL
}
a
(
SLAPOS_MARK
)
a
(
'LABEL=%(label)s /mnt/%(label)s ext4 defaults,noatime 0 0
\
n
'
%
d
)
...
...
@@ -175,7 +175,7 @@ def getWidestFreeSpaceList(disk_dict):
for
l
in
v
:
size
=
int
(
l
.
split
(
':'
)[
3
].
rstrip
(
'B'
))
free_space_disk_dict
.
setdefault
(
size
,
[])
free_space_disk_dict
[
size
].
append
(
dict
(
disk
=
disk
,
info
=
l
)
)
free_space_disk_dict
[
size
].
append
(
{
'disk'
:
disk
,
'info'
:
l
}
)
if
free_space_disk_dict
:
m
=
max
(
free_space_disk_dict
)
if
m
>
MINIMUM_FREE_SPACE
:
...
...
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