mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Add option to perform full backup prior to upgrade. First commit of 2011 pfSense hackathon!
This commit is contained in:
parent
0c13b5f6aa
commit
b2a67b558c
@ -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
|
||||
|
||||
|
||||
@ -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>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user