]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blobdiff - src/install+setup/install/main.c
installer: Skip welcome message in unattended mode.
[people/teissler/ipfire-2.x.git] / src / install+setup / install / main.c
index cb697a1524ca78f15d5e22fbd5c03ece027cd96e..9ea3f3193708f68cace5573adb6204776060d8a7 100644 (file)
@@ -151,10 +151,10 @@ int main(int argc, char *argv[])
 
        newtPushHelpLine(ctr[TR_HELPLINE]);
 
-       sprintf(message, ctr[TR_WELCOME], NAME);
-       newtWinMessage(title, ctr[TR_OK], message);
-
        if (!unattended) {
+               sprintf(message, ctr[TR_WELCOME], NAME);
+               newtWinMessage(title, ctr[TR_OK], message);
+
                if (disclaimerbox(discl_msg)==0) {
                        errorbox(ctr[TR_LICENSE_NOT_ACCEPTED]);
                        goto EXIT;
@@ -523,7 +523,7 @@ int main(int argc, char *argv[])
                replace("/harddisk/boot/grub/grub.conf", "splashimage", "#splashimage");
                replace("/harddisk/boot/grub/grub.conf", "#serial", "serial");
                replace("/harddisk/boot/grub/grub.conf", "#terminal", "terminal");
-               replace("/harddisk/boot/grub/grub.conf", " panic=10 ", " console=ttyS0,38400 panic=10 ");
+               replace("/harddisk/boot/grub/grub.conf", " panic=10 ", " console=ttyS0,38400n8 panic=10 ");
 
                /*inittab*/
                replace("/harddisk/etc/inittab", "1:2345:respawn:", "#1:2345:respawn:");
@@ -535,6 +535,9 @@ int main(int argc, char *argv[])
                replace("/harddisk/etc/inittab", "#7:2345:respawn:", "7:2345:respawn:");
        }
 
+       /* Set marker that the user has already accepted the gpl */
+       mysystem("/usr/bin/touch /harddisk/var/ipfire/main/gpl_accepted");
+
        /* Copy restore file from cdrom */
        if (unattended && (strlen(restore_file) > 0)) {
                fprintf(flog, "unattended: Copy restore file\n");
@@ -550,7 +553,7 @@ int main(int argc, char *argv[])
        if (!unattended) {
                sprintf(message, ctr[TR_CONGRATULATIONS_LONG],
                                NAME, SNAME, NAME);
-               newtWinMessage(ctr[TR_CONGRATULATIONS], ctr[TR_OK], message);
+               newtWinMessage(ctr[TR_CONGRATULATIONS], ctr[TR_PRESS_OK_TO_REBOOT], message);
        }
 
        allok = 1;
@@ -602,13 +605,13 @@ EXIT:
 
        newtFinished();
 
-       system("/bin/umount /harddisk/proc");
-       system("/bin/umount /harddisk/dev");
-       system("/bin/umount /harddisk/sys");
+       system("/bin/umount /harddisk/proc >/dev/null 2>&1");
+       system("/bin/umount /harddisk/dev >/dev/null 2>&1");
+       system("/bin/umount /harddisk/sys >/dev/null 2>&1");
 
-       system("/bin/umount /harddisk/var");
-       system("/bin/umount /harddisk/boot");
-       system("/bin/umount /harddisk");
+       system("/bin/umount /harddisk/var >/dev/null 2>&1");
+       system("/bin/umount /harddisk/boot >/dev/null 2>&1");
+       system("/bin/umount /harddisk >/dev/null 2>&1");
 
        if (!(allok))
                system("/etc/halt");