Skip to content

Commit

Permalink
Support loop mount on isos (#119)
Browse files Browse the repository at this point in the history
Signed-off-by: David Cassany <dcassany@suse.com>
  • Loading branch information
davidcassany authored Feb 25, 2022
1 parent e9b4112 commit dd23b93
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pkg/elemental/elemental.go
Original file line number Diff line number Diff line change
Expand Up @@ -457,14 +457,12 @@ func (c *Elemental) GetIso() (tmpDir string, err error) {
if err != nil {
return "", err
}

err = c.config.Fs.MkdirAll(isoMnt, os.ModeDir)
if err != nil {
return "", err
}
var mountOptions []string
c.config.Logger.Infof("Mounting iso %s into %s", tmpFile, isoMnt)
err = c.config.Mounter.Mount(tmpFile, isoMnt, "auto", mountOptions)
err = c.config.Mounter.Mount(tmpFile, isoMnt, "auto", []string{"loop"})
if err != nil {
return "", err
}
Expand All @@ -479,7 +477,7 @@ func (c *Elemental) GetIso() (tmpDir string, err error) {
if err != nil {
return "", err
}
err = c.config.Mounter.Mount(filepath.Join(isoMnt, cnst.IsoRootFile), rootfsMnt, "auto", mountOptions)
err = c.config.Mounter.Mount(filepath.Join(isoMnt, cnst.IsoRootFile), rootfsMnt, "auto", []string{})
if err != nil {
return "", err
}
Expand Down

0 comments on commit dd23b93

Please sign in to comment.