/* default stuff for main/settings. */
replacekeyvalue(kv, "LANGUAGE", lang);
- replacekeyvalue(kv, "HOSTNAME", SNAME);
+ replacekeyvalue(kv, "HOSTNAME", DISTRO_SNAME);
replacekeyvalue(kv, "THEME", "ipfire");
writekeyvalues(kv, "/harddisk" CONFIG_ROOT "/main/settings");
freekeyvalues(kv);
return string;
}
-#define DEFAULT_LANG "en_US.utf8"
+#define DEFAULT_LANG "en.utf8"
#define NUM_LANGS 13
static struct lang {
static struct config {
int unattended;
int serial_console;
+ int novga;
int require_networking;
int perform_download;
int disable_swap;
} config = {
.unattended = 0,
.serial_console = 0,
+ .novga = 0,
.require_networking = 0,
.perform_download = 0,
.disable_swap = 0,
if ((strcmp(key, "console") == 0) && (strncmp(val, "ttyS", 4) == 0))
c->serial_console = 1;
+ // novga
+ else if (strcmp(key, "novga") == 0)
+ c->novga = 1;
+
// enable networking?
else if (strcmp(token, "installer.net") == 0)
c->require_networking = 1;
FILE *copying;
setlocale(LC_ALL, "");
- sethostname(SNAME, 10);
+ sethostname(DISTRO_SNAME, 10);
/* Log file/terminal stuff. */
FILE* flog = NULL;
if (roottext)
newtDrawRootText(0, 0, roottext);
- snprintf(title, sizeof(title), "%s - %s", NAME, SLOGAN);
+ snprintf(title, sizeof(title), "%s - %s", DISTRO_NAME, DISTRO_SLOGAN);
// Parse parameters from the kernel command line
parse_command_line(&config);
if (!config.unattended) {
snprintf(message, sizeof(message),
_("Welcome to the %s installation program.\n\n"
- "Selecting Cancel on any of the following screens will reboot the computer."), NAME);
+ "Selecting Cancel on any of the following screens will reboot the computer."), DISTRO_NAME);
newtWinMessage(title, _("Start installation"), message);
}
fprintf(flog, " boot : %s (%lluMB)\n", destination->part_boot, BYTES2MB(destination->size_boot));
fprintf(flog, " swap : %s (%lluMB)\n", destination->part_swap, BYTES2MB(destination->size_swap));
fprintf(flog, " root : %s (%lluMB)\n", destination->part_root, BYTES2MB(destination->size_root));
- fprintf(flog, " data : %s (%lluMB)\n", destination->part_data, BYTES2MB(destination->size_data));
fprintf(flog, "Memory : %lluMB\n", BYTES2MB(hw_memory()));
// Warn the user if there is not enough space to create a swap partition
// Extract files...
snprintf(commandstring, STRING_SIZE,
- "/bin/tar -C /harddisk -xvf /cdrom/distro.img --lzma 2>/dev/null");
+ "/bin/tar -C /harddisk -xvf /cdrom/distro.img --xz 2>/dev/null");
if (runcommandwithprogress(60, 4, title, commandstring, INST_FILECOUNT,
_("Installing the system..."), logfile)) {
fclose(f);
replace(DESTINATION_MOUNT_PATH "/etc/default/grub", "panic=10", "panic=10 console=ttyS0,115200n8");
+ }
+
+ /* novga */
+ if (config.novga) {
+ /* grub */
+ FILE* f = fopen(DESTINATION_MOUNT_PATH "/etc/default/grub", "a");
+ if (!f) {
+ errorbox(_("Unable to open /etc/default/grub for writing."));
+ goto EXIT;
+ }
- /* inittab */
- replace("/harddisk/etc/inittab", "1:2345:respawn:", "#1:2345:respawn:");
- replace("/harddisk/etc/inittab", "2:2345:respawn:", "#2:2345:respawn:");
- replace("/harddisk/etc/inittab", "3:2345:respawn:", "#3:2345:respawn:");
- replace("/harddisk/etc/inittab", "4:2345:respawn:", "#4:2345:respawn:");
- replace("/harddisk/etc/inittab", "5:2345:respawn:", "#5:2345:respawn:");
- replace("/harddisk/etc/inittab", "6:2345:respawn:", "#6:2345:respawn:");
- replace("/harddisk/etc/inittab", "#7:2345:respawn:", "7:2345:respawn:");
+ fprintf(f, "GRUB_GFXMODE=\"none\"\n");
+ fclose(f);
}
rc = hw_install_bootloader(destination, logfile);
newtPopWindow();
- /* Set marker that the user has already accepted the gpl */
- mysystem(logfile, "/usr/bin/touch /harddisk/var/ipfire/main/gpl_accepted");
+ /* Set marker that the user has already accepted the GPL if the license has been shown
+ * in the installation process. In unatteded mode, the user will be presented the
+ * license when he or she logs on to the web user interface for the first time. */
+ if (!config.unattended)
+ mysystem(logfile, "/usr/bin/touch /harddisk/var/ipfire/main/gpl_accepted");
/* Copy restore file from cdrom */
char* backup_file = hw_find_backup_file(logfile, SOURCE_MOUNT_PATH);
"Please remove any installation mediums from this system and hit the reboot button. "
"Once the system has restarted you will be asked to setup networking and system passwords. "
"After that, you should point your web browser at https://%s:444 (or what ever you name "
- "your %s) for the web configuration console."), NAME, SNAME, NAME);
+ "your %s) for the web configuration console."), DISTRO_NAME, DISTRO_SNAME, DISTRO_NAME);
newtWinMessage(_("Congratulations!"), _("Reboot"), message);
}