Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.toolbox
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
Joanne Hugé
slapos.toolbox
Commits
a412f58a
Commit
a412f58a
authored
Jul 25, 2012
by
Antoine Catton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete old rootfs during creation
parent
fff3f953
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
slapos/container/prepare.py
slapos/container/prepare.py
+3
-0
No files found.
slapos/container/prepare.py
View file @
a412f58a
...
@@ -98,8 +98,11 @@ def extract_rootfs(partition_path, conf):
...
@@ -98,8 +98,11 @@ def extract_rootfs(partition_path, conf):
def
create
(
sr_directory
,
partition_path
,
conf
):
def
create
(
sr_directory
,
partition_path
,
conf
):
tmp_dir
=
conf
.
get
(
'rootfs'
,
'tmp'
)
tmp_dir
=
conf
.
get
(
'rootfs'
,
'tmp'
)
rootfs_dir
=
conf
.
get
(
'rootfs'
,
'directory'
)
if
os
.
path
.
exists
(
tmp_dir
):
if
os
.
path
.
exists
(
tmp_dir
):
shutil
.
rmtree
(
tmp_dir
)
shutil
.
rmtree
(
tmp_dir
)
if
os
.
path
.
exists
(
rootfs_dir
):
shutil
.
rmtree
(
rootfs_dir
)
extract_rootfs
(
partition_path
,
conf
)
extract_rootfs
(
partition_path
,
conf
)
lxc_filename
=
os
.
path
.
join
(
partition_path
,
'config'
)
lxc_filename
=
os
.
path
.
join
(
partition_path
,
'config'
)
...
...
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