Skip to content

Commit

Permalink
Fixed /mnt/dev cleanup to work with /mnt/dev bind mount
Browse files Browse the repository at this point in the history
Related to bsc#1089643
  • Loading branch information
lslezak committed May 2, 2018
1 parent 7d0a794 commit 2de3e70
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/clients/inst_kickoff.rb
Expand Up @@ -51,7 +51,9 @@ def main
# Mount (bind) the current /dev/ to the /installed_system/dev/
LocalCommand(
Builtins.sformat(
"/bin/rm -rf '%1/dev/' && /bin/mkdir -p '%1/dev/' && " \
# try unmounting the /mnt/dev directory before the cleanup, usually there
# is a bind mount /dev -> /mnt/dev which would remove the files also from /dev
"/usr/bin/umount '%1/dev/'; /bin/rm -rf '%1/dev/' && /bin/mkdir -p '%1/dev/' && " \
"/bin/mount -v --bind '/dev/' '%1/dev/'",
String.Quote(Installation.destdir)
)
Expand Down

0 comments on commit 2de3e70

Please sign in to comment.