firstsetup: add reboot if setup was not finnished.
authorArne Fitzenreiter <arne_f@ipfire.org>
Fri, 24 Dec 2010 00:02:57 +0000 (01:02 +0100)
committerArne Fitzenreiter <arne_f@ipfire.org>
Fri, 24 Dec 2010 00:02:57 +0000 (01:02 +0100)
src/initscripts/init.d/firstsetup
src/initscripts/init.d/openvmtools [changed mode: 0755->0644]
src/install+setup/setup/main.c

index b03b729..8ea1b5e 100644 (file)
@@ -2,6 +2,10 @@
 /etc/init.d/sysklogd start
 export LANG=en_US.utf8
 /usr/local/sbin/setup /dev/tty2 INSTALL
+if [ "${?}" == "1" ]; then
+       echo Setup not finished. Rebooting ...
+       reboot -f
+fi
 echo Restarting udev...
 killall udevd
 /sbin/udevd --daemon
old mode 100755 (executable)
new mode 100644 (file)
index 33cae34..a14930d 100644 (file)
@@ -199,7 +199,17 @@ EXIT:
                if (autook)
                        newtWinMessage(title, ctr[TR_OK], ctr[TR_SETUP_FINISHED]);
                else
+               {
                        newtWinMessage(ctr[TR_WARNING], ctr[TR_OK], ctr[TR_SETUP_NOT_COMPLETE]);
+
+                       fprintf(flog, "Setup program not finnished.\n");
+                       fflush(flog);
+                       fclose(flog);
+
+                       newtFinished();
+
+                       return 1;
+               }
        }
 
        fprintf(flog, "Setup program ended.\n");