Skip to content
This repository has been archived by the owner on Nov 24, 2022. It is now read-only.

Commit

Permalink
Fixed path to packages files and create it if it doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean-Baptiste Lallement committed May 27, 2013
1 parent 2fadd21 commit b71b272
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions ottolib/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,17 @@ def _copy_otto_files(self):
}
if vga_device is not None and "Driver" in vga_device:
if vga_device["Driver"] in drivers:
logging.info("Installation additional drivers for graphics "
logging.info("Installing additional drivers for graphics "
"card {}".format(vga_device["Device"]))
# l-h-g must be installed to compile additional modules
pkgs = "linux-headers-generic {}\n".format(
drivers[vga_device["Driver"]])
with open(os.path.join(dst, "/var/local/otto/00drivers.pkgs"), 'w') as fpkgs:
pkgsdir = os.path.join(self.guestpath, "guest", "var/local/otto/")
if not os.path.exists(pkgsdir):
os.makedirs(pkgsdir)
with open(os.path.join(pkgsdir, "00drivers.pkgs"), 'w') as fpkgs:
logging.debug("Custom drivers written to {}".format(
os.path.join(pkgsdir, "00drivers.pkgs")))
fpkgs.write(pkgs)

def install_custom_installation(self, path):
Expand Down

0 comments on commit b71b272

Please sign in to comment.