forked from pquiring/javaforce
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjfuseiso.java
More file actions
executable file
·51 lines (47 loc) · 1.09 KB
/
Copy pathjfuseiso.java
File metadata and controls
executable file
·51 lines (47 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package javaforce.utils;
import java.util.*;
import javaforce.*;
/**
* Just calls 'fuseiso'.
*
* @author pquiring
*
* Created : Feb 8, 2014
*/
public class jfuseiso {
public boolean auth(String args[], String pass) {
//iso never need auth
return true;
}
public void start(String args[]) {
ArrayList<String> cmd = new ArrayList<String>();
cmd.add("fuseiso");
cmd.add("-n"); //do NOT maintain $HOME/.mtab.fuseiso
for(int a=0;a<args.length;a++) {
cmd.add(args[a]);
}
cmd.add("-f"); //foreground
try {
ProcessBuilder pb = new ProcessBuilder();
pb.command(cmd);
Process p = pb.start();
p.waitFor();
} catch (Exception e) {
JFLog.log(e);
}
}
public static void main(String args[]) {
if (args.length == 0) {
System.out.println("Usage : jfuse-iso iso_file mount");
return;
}
new jfuseiso().main2(args);
}
public void main2(String args[]) {
try {
start(args);
} catch (Exception e) {
JFLog.log("Error:" + e);
}
}
}