diff options
-rwxr-xr-x | etc/rc.firmware | 6 | ||||
-rwxr-xr-x | usr/local/www/system_firmware.php | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/etc/rc.firmware b/etc/rc.firmware index 698db67..1fb9f65 100755 --- a/etc/rc.firmware +++ b/etc/rc.firmware @@ -398,6 +398,12 @@ pfSenseupgrade) touch /var/run/firmwarelock.dirty + if [ -f /tmp/perform_full_backup.txt ]; then + echo "Performing full backup" >> /conf/upgrade_log.txt + /etc/rc.create_full_backup + rm /tmp/perform_full_backup.txt + fi + touch /conf/upgrade_log.txt echo "" >> /conf/upgrade_log.txt diff --git a/usr/local/www/system_firmware.php b/usr/local/www/system_firmware.php index 9e876c9..ceafcec 100755 --- a/usr/local/www/system_firmware.php +++ b/usr/local/www/system_firmware.php @@ -111,6 +111,9 @@ if(is_subsystem_dirty('firmwarelock')) { exit; } +if($_POST['backupbeforeupgrade']) + touch("/tmp/perform_full_backup.txt"); + if($_POST['kerneltype']) { if($_POST['kerneltype'] == "single") system("touch /boot/kernel/pfsense_kernel.txt"); @@ -289,6 +292,8 @@ if(stristr($_FILES['ulfile']['name'],"nanobsd")) <input name="Submit" type="submit" class="formbtn" value="Upgrade firmware" onClick="window.open('upload_progress.php?upload_id=<?=$upload_id?>','UploadMeter','width=370,height=115', true); return true;"> */ ?> + <input type="checkbox" name='backupbeforeupgrade' id='backupbeforeupgrade'> <?=gettext("Perform full backup prior to upgrade");?> + <br><br> <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Upgrade firmware");?>"> <?php endif; else: ?> <strong><?=gettext("You must reboot the system before you can upgrade the firmware.");?></strong> |