summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xetc/rc.initial.firmware_update28
1 files changed, 28 insertions, 0 deletions
diff --git a/etc/rc.initial.firmware_update b/etc/rc.initial.firmware_update
index 210872d..c10b514 100755
--- a/etc/rc.initial.firmware_update
+++ b/etc/rc.initial.firmware_update
@@ -106,7 +106,35 @@ switch ($command) {
fclose($fp);
+function check_for_kernel_file() {
+ if(!file_exists("/boot/kernel/pfsense_kernel.txt")) {
+ echo "\nPlease select which kernel you would like to use:\n";
+ echo "\n1. Non SMP kernel";
+ echo "\n2. SMP kernel";
+ echo "\n3. Embedded kernel (no video or keyboard)";
+ echo "\n4. Developers kernel (slower performing, more debugging)";
+ echo "\nPlease enter a number [1-4]: ";
+ $selection = strtoupper(chop(fgets($fp)));
+ switch ($selection) {
+ case "1":
+ touch("/boot/kernel/pfsense_kernel.txt");
+ break;
+ case "2":
+ exec("echo SMP > /boot/kernel/pfsense_kernel.txt");
+ break;
+ case "3":
+ exec("echo wrap > /boot/kernel/pfsense_kernel.txt");
+ break;
+ case "4":
+ exec("echo Developers > /boot/kernel/pfsense_kernel.txt");
+ break;
+ }
+ echo "\n";
+ }
+}
+
function do_upgrade($path) {
+ check_for_kernel_file();
echo "\nOne moment please... Invoking firmware upgrade...\n";
exec("/etc/rc.firmware pfSenseupgrade $path");
unlink_if_exists($path);
OpenPOWER on IntegriCloud