Package br.com.objectos.rio.core.os

Examples of br.com.objectos.rio.core.os.ChrootMount


  }

  private void emerge(EtoOsLivecdOptions options) {
    HttpServer server = options.distfilesServer();
    Directory mountDir = dirs.livecdMountDir();
    ChrootMount mount = ChrootMount.at(mountDir).mount();

    infoAction("emerge");
    info("Emerging extra packages.");

    server.download("jdk-6u45-linux-x64.bin")
        .toDir(mountDir.dirAt("usr/portage/distfiles"));

    try {

      Chroot chroot = Chroot.at(mountDir)
          .add("source /etc/profile")
          .add("export PS1=\"(chroot) $PS1\"")
          .add("emerge -v sun-jdk-bin")
          .exec();

      Stdout.print(chroot);

    } finally {

      ChrootUmount umount = mount.umount();
      Stdout.print(umount);

    }
  }
View Full Code Here


    chmod(portage)
        .file("packages").to(755)
        .recursively()
        .exec();

    ChrootMount mount = ChrootMount.at(mountDir).mount();

    try {

      Chroot chroot = Chroot.at(mountDir)
          .add("source /etc/profile")
          .add("export PS1=\"(chroot) $PS1\"")
          .add("quickpkg \"*/*\"")
          .exec();

      Stdout.print(chroot);

    } finally {

      ChrootUmount umount = mount.umount();
      Stdout.print(umount);

    }
  }
View Full Code Here

  public AddAllIf addAllIf(List<String> commands) {
    return new AddAllIf(commands);
  }

  public void exec() {
    ChrootMount mount = ChrootMount.at(mountDir).mount();

    try {

      Chroot chroot = Chroot.at(mountDir).addAll(commands).exec();
      Stdout.print(chroot);

    } finally {

      ChrootUmount umount = mount.umount();
      Stdout.print(umount);

    }
  }
View Full Code Here

    mount(dev1).to(installMountPoint.dirAt("boot"));

    infoAction("grub");
    info("Installing grub2.");

    ChrootMount mount = ChrootMount.at(installMountPoint).mount();

    try {

      Chroot chroot = Chroot.at(installMountPoint)
          .add("source /etc/profile")
          .add("export PS1=\"(chroot) $PS1\"")
          .add("grub2-install %s", options.device)
          .add("grub2-mkconfig -o /boot/grub/grub.cfg")
          .exec();

      Stdout.print(chroot);

    } finally {

      ChrootUmount umount = mount.umount();
      Stdout.print(umount);
      umount(installMountPoint.dirAt("boot"));
      umount(installMountPoint);

    }
View Full Code Here

  }

  private void emerge(OsLivecdOptions options) {
    HttpServer server = options.distfilesServer();
    Directory mountDir = dirs.livecdMountDir();
    ChrootMount mount = ChrootMount.at(mountDir).mount();

    infoAction("emerge");
    info("Emerging extra packages.");

    server.download("jdk-6u45-linux-x64.bin")
        .toDir(mountDir.dirAt("usr/portage/distfiles"));

    try {

      Chroot chroot = Chroot.at(mountDir)
          .add("source /etc/profile")
          .add("export PS1=\"(chroot) $PS1\"")
          .add("emerge -v sun-jdk-bin")
          .exec();

      Stdout.print(chroot);

    } finally {

      ChrootUmount umount = mount.umount();
      Stdout.print(umount);

    }
  }
View Full Code Here

TOP

Related Classes of br.com.objectos.rio.core.os.ChrootMount

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.