示例#1
0
  public static String getSbin() {
    String strSbin = "/usr/varian/sbin/";
    if (Util.iswindows()) {
      strSbin = "/vnmr/bin/";
    } else {
      UNFile file = new UNFile(strSbin);
      if (!file.exists()) strSbin = FileUtil.sysdir() + "/bin/";
    }

    return strSbin;
  }
示例#2
0
  public static String getSudo() {
    // Default to /usr/bin
    String strSudo = "/usr/bin/sudo ";

    if (Util.iswindows()) strSudo = "";

    UNFile file = new UNFile("/usr/bin/sudo");
    if (!file.exists()) {
      // If no /usr/bin/sudo, then try /usr/local/bin
      file = new UNFile("/usr/local/bin/sudo");
      if (file.exists()) strSudo = "/usr/local/bin/sudo ";
    }
    // Messages.postDebug("SUDO path=" + strSudo);
    return strSudo;
  }