Package org.platformlayer.ops

Examples of org.platformlayer.ops.OpsTarget.executeCommand()


      // Remove policy file
      File policyFile = new File(rootfsDir, "usr/sbin/policy-rc.d");
      target.rm(policyFile);
    }

    target.executeCommand("sync");
    target.executeCommand("umount {0}", new File(rootfsDir, "proc"));

    if (!buildTar) {
      target.executeCommand("sync");
      target.executeCommand("umount {0}", rootfsDir);
View Full Code Here


      File policyFile = new File(rootfsDir, "usr/sbin/policy-rc.d");
      target.rm(policyFile);
    }

    target.executeCommand("sync");
    target.executeCommand("umount {0}", new File(rootfsDir, "proc"));

    if (!buildTar) {
      target.executeCommand("sync");
      target.executeCommand("umount {0}", rootfsDir);
      target.executeCommand("sync");
View Full Code Here

    target.executeCommand("sync");
    target.executeCommand("umount {0}", new File(rootfsDir, "proc"));

    if (!buildTar) {
      target.executeCommand("sync");
      target.executeCommand("umount {0}", rootfsDir);
      target.executeCommand("sync");
      target.executeCommand("kpartx -d {0}", imageFile);
      target.executeCommand("sync");
    }
View Full Code Here

    target.executeCommand("sync");
    target.executeCommand("umount {0}", new File(rootfsDir, "proc"));

    if (!buildTar) {
      target.executeCommand("sync");
      target.executeCommand("umount {0}", rootfsDir);
      target.executeCommand("sync");
      target.executeCommand("kpartx -d {0}", imageFile);
      target.executeCommand("sync");
    }
View Full Code Here

    target.executeCommand("umount {0}", new File(rootfsDir, "proc"));

    if (!buildTar) {
      target.executeCommand("sync");
      target.executeCommand("umount {0}", rootfsDir);
      target.executeCommand("sync");
      target.executeCommand("kpartx -d {0}", imageFile);
      target.executeCommand("sync");
    }

    if (buildTar) {
View Full Code Here

    if (!buildTar) {
      target.executeCommand("sync");
      target.executeCommand("umount {0}", rootfsDir);
      target.executeCommand("sync");
      target.executeCommand("kpartx -d {0}", imageFile);
      target.executeCommand("sync");
    }

    if (buildTar) {
      Command compress = Command.build("cd {0}; tar jcf {1} .", rootfsDir, imageFile);
View Full Code Here

    if (!buildTar) {
      target.executeCommand("sync");
      target.executeCommand("umount {0}", rootfsDir);
      target.executeCommand("sync");
      target.executeCommand("kpartx -d {0}", imageFile);
      target.executeCommand("sync");
    }

    if (buildTar) {
      Command compress = Command.build("cd {0}; tar jcf {1} .", rootfsDir, imageFile);
      target.executeCommand(compress.setTimeout(TimeSpan.FIFTEEN_MINUTES));
View Full Code Here

      target.executeCommand("sync");
    }

    if (buildTar) {
      Command compress = Command.build("cd {0}; tar jcf {1} .", rootfsDir, imageFile);
      target.executeCommand(compress.setTimeout(TimeSpan.FIFTEEN_MINUTES));
    }

    FilesystemInfo imageInfo = target.getFilesystemInfoFile(imageFile);

    File uploadImageFile;
View Full Code Here

        // 3) Mounting a qcow2 image (or other image formats) is tricky vs
        // loopback mount
        uploadImageFile = new File(imageFile.getParentFile(), "image.qcow2");
        command = Command.build("qemu-img convert -f raw -O qcow2 {0} {1}", imageFile, uploadImageFile);
        command.setTimeout(TimeSpan.THIRTY_MINUTES);
        target.executeCommand(command);
      } else {
        uploadImageFile = new File(imageFile.getParentFile(), "image.raw.gz");

        command = Command.build("gzip -c --best {0} > {1}", imageFile, uploadImageFile);
        command.setTimeout(TimeSpan.THIRTY_MINUTES);
View Full Code Here

      } else {
        uploadImageFile = new File(imageFile.getParentFile(), "image.raw.gz");

        command = Command.build("gzip -c --best {0} > {1}", imageFile, uploadImageFile);
        command.setTimeout(TimeSpan.THIRTY_MINUTES);
        target.executeCommand(command);
      }
    } else {
      uploadImageFile = imageFile;
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.