X-Git-Url: http://git.ipfire.org/?p=people%2Fpmueller%2Fipfire-2.x.git;a=blobdiff_plain;f=src%2Finstaller%2Fmain.c;h=c420de3a18572760fa1a1eff837213f8be276153;hp=358b2c46ffdf892a17a894ec7f6fbb6c2d367259;hb=f042e1d398bf4bade415773fe5849791f864444c;hpb=f8cdaa1084caefafca126ca7e50600f8fbc4a1bb diff --git a/src/installer/main.c b/src/installer/main.c index 358b2c46ff..c420de3a18 100644 --- a/src/installer/main.c +++ b/src/installer/main.c @@ -271,6 +271,7 @@ static struct lang { static struct config { int unattended; int serial_console; + int novga; int require_networking; int perform_download; int disable_swap; @@ -280,6 +281,7 @@ static struct config { } config = { .unattended = 0, .serial_console = 0, + .novga = 0, .require_networking = 0, .perform_download = 0, .disable_swap = 0, @@ -309,6 +311,10 @@ static void parse_command_line(struct config* c) { 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; @@ -825,6 +831,19 @@ int main(int argc, char *argv[]) { replace("/harddisk/etc/inittab", "#7:2345:respawn:", "7:2345:respawn:"); } + /* 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; + } + + fprintf(f, "GRUB_GFXMODE=\"none\"\n"); + fclose(f); + } + rc = hw_install_bootloader(destination, logfile); if (rc) { errorbox(_("Unable to install the bootloader.")); @@ -833,8 +852,11 @@ int main(int argc, char *argv[]) { 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);