mirror of https://git.48k.eu/ogserver
boot: set hostname in grub configuration
add missing hostname= to grub configuration.master
parent
d8b271f503
commit
4db69ad054
|
@ -20,6 +20,7 @@
|
||||||
|
|
||||||
#define OGRELIVE_TEMPLATE \
|
#define OGRELIVE_TEMPLATE \
|
||||||
"# Autogenerated by ogserver on %s - do not edit this file!\n" \
|
"# Autogenerated by ogserver on %s - do not edit this file!\n" \
|
||||||
|
"set oghostname=%s\n" \
|
||||||
"set ogserver=%s\n" \
|
"set ogserver=%s\n" \
|
||||||
"set ogrepo=%s\n" \
|
"set ogrepo=%s\n" \
|
||||||
"set ogreliveversion=%s\n" \
|
"set ogreliveversion=%s\n" \
|
||||||
|
@ -45,7 +46,7 @@
|
||||||
" insmod http\n" \
|
" insmod http\n" \
|
||||||
" insmod net\n" \
|
" insmod net\n" \
|
||||||
" net_bootp\n" \
|
" net_bootp\n" \
|
||||||
" linux (http,$ogrepo)/$ogrelivedir/vmlinuz ro boot=live quiet splash oglivedir=$ogrelivedir ip=$ogserver ogrepo=$ogrepo username=$username passwd=$passwd fetch=http://$ogrepo/$ogrelivedir/filesystem.squashfs\n" \
|
" linux (http,$ogrepo)/$ogrelivedir/vmlinuz ro boot=live quiet splash oglivedir=$ogrelivedir hostname=$oghostname ip=$ogserver ogrepo=$ogrepo username=$username passwd=$passwd fetch=http://$ogrepo/$ogrelivedir/filesystem.squashfs\n" \
|
||||||
" initrd (http,$ogrepo)/$ogrelivedir/initrd.img\n" \
|
" initrd (http,$ogrepo)/$ogrelivedir/initrd.img\n" \
|
||||||
" boot\n" \
|
" boot\n" \
|
||||||
"}\n"
|
"}\n"
|
||||||
|
@ -92,7 +93,7 @@ int ogrelive_generate_grub2_file(const struct og_boot_cfg *cfg, const char *mac)
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(fp, OGRELIVE_TEMPLATE, date,
|
fprintf(fp, OGRELIVE_TEMPLATE, date,
|
||||||
cfg->ogserver, cfg->ogrepo, cfg->ogrelivedir, cfg->username, cfg->passwd);
|
cfg->hostname, cfg->ogserver, cfg->ogrepo, cfg->ogrelivedir, cfg->username, cfg->passwd);
|
||||||
|
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
#define _OG_BOOT_H_
|
#define _OG_BOOT_H_
|
||||||
|
|
||||||
struct og_boot_cfg {
|
struct og_boot_cfg {
|
||||||
|
const char *hostname;
|
||||||
const char *ogserver;
|
const char *ogserver;
|
||||||
const char *ogrepo;
|
const char *ogrepo;
|
||||||
const char *ogrelivedir;
|
const char *ogrelivedir;
|
||||||
|
|
|
@ -1721,6 +1721,7 @@ static int og_set_client_mode(struct og_dbi *dbi, const char *client_ip,
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boot_cfg.hostname = boot_params.nombreordenador;
|
||||||
boot_cfg.ogserver = boot_params.server_ip;
|
boot_cfg.ogserver = boot_params.server_ip;
|
||||||
boot_cfg.ogrepo = boot_params.repo_ip;
|
boot_cfg.ogrepo = boot_params.repo_ip;
|
||||||
boot_cfg.ogrelivedir = boot_params.oglivedir;
|
boot_cfg.ogrelivedir = boot_params.oglivedir;
|
||||||
|
|
Loading…
Reference in New Issue