summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rest.c44
1 files changed, 27 insertions, 17 deletions
diff --git a/src/rest.c b/src/rest.c
index 022ec71..f727322 100644
--- a/src/rest.c
+++ b/src/rest.c
@@ -1572,23 +1572,33 @@ static int og_get_client_mode_params(struct og_dbi *dbi, const char *mac, char *
goto err_out;
}
- snprintf(params, params_size,
- " LANG=%s ip=%s:%s:%s:%s:%s:%s:none group=%s ogrepo=%s oglive=%s oglog=%s ogshare=%s oglivedir=%s ogprof=%s server=%s"
- "%s%s%s%s%s%s%s%s%s%s%s%s",
- lang,
- boot_params.ip, server_ip, boot_params.router, boot_params.netmask, boot_params.nombreordenador, boot_params.netiface,
- boot_params.nombreaula,
- repository_ip,
- server_ip, server_ip, server_ip,
- boot_params.oglivedir,
- boot_params.is_prof ? "true" : "false",
- server_ip,
- boot_params.hardprofile[0] ? " hardprofile=" : "", boot_params.hardprofile[0] ? boot_params.hardprofile: "",
- boot_params.ntp[0] ? " ogntp=" : "", boot_params.ntp[0] ? boot_params.ntp : "",
- boot_params.dns[0] ? " ogdns=" : "", boot_params.dns[0] ? boot_params.dns : "",
- boot_params.proxy[0] ? " ogproxy=" : "", boot_params.proxy[0] ? boot_params.proxy : "",
- boot_params.has_unit ? " ogunit=" : "", boot_params.has_unit ? boot_params.directorio : "",
- res_prefix, res_value);
+ if (!strncmp(boot_params.oglivedir, "ogReLive", strlen("ogReLive")))
+ snprintf(params, params_size,
+ " ip=%s:%s:%s:%s:%s:%s:none ogrepo=%s oglivedir=%s fetch=http://%s/%s/filesystem.squashfs",
+ boot_params.ip, server_ip, boot_params.router, boot_params.netmask, boot_params.nombreordenador, boot_params.netiface,
+ repository_ip,
+ boot_params.oglivedir,
+ repository_ip,
+ boot_params.oglivedir);
+ else
+ snprintf(params, params_size,
+ " LANG=%s ip=%s:%s:%s:%s:%s:%s:none group=%s ogrepo=%s oglive=%s oglog=%s ogshare=%s oglivedir=%s ogprof=%s server=%s"
+ "%s%s%s%s%s%s%s%s%s%s%s%s",
+ lang,
+ boot_params.ip, server_ip, boot_params.router, boot_params.netmask, boot_params.nombreordenador, boot_params.netiface,
+ boot_params.nombreaula,
+ repository_ip,
+ server_ip, server_ip, server_ip,
+ boot_params.oglivedir,
+ boot_params.is_prof ? "true" : "false",
+ server_ip,
+ boot_params.hardprofile[0] ? " hardprofile=" : "", boot_params.hardprofile[0] ? boot_params.hardprofile: "",
+ boot_params.ntp[0] ? " ogntp=" : "", boot_params.ntp[0] ? boot_params.ntp : "",
+ boot_params.dns[0] ? " ogdns=" : "", boot_params.dns[0] ? boot_params.dns : "",
+ boot_params.proxy[0] ? " ogproxy=" : "", boot_params.proxy[0] ? boot_params.proxy : "",
+ boot_params.has_unit ? " ogunit=" : "", boot_params.has_unit ? boot_params.directorio : "",
+ res_prefix, res_value);
+
err_out:
free((void *)boot_params.ip);
free((void *)boot_params.router);