diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2008-01-11 17:53:14 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2008-01-11 17:53:14 +0000 |
commit | 2ebbc642701f82b24ef7d81b40fe6b0a0357c5a3 (patch) | |
tree | 9881a9bbd372e627555febafc93dcaaa0bafcc40 /etc | |
parent | 7e74b5bf4c4e6ed5cd1db0a2b94dca29d1afe90b (diff) | |
download | pfsense-2ebbc642701f82b24ef7d81b40fe6b0a0357c5a3.zip pfsense-2ebbc642701f82b24ef7d81b40fe6b0a0357c5a3.tar.gz |
* Do not allow the image to go read only during download / upgrade ops
* If a previous /root/firmware.tgz file exists before download, unlink
the file to avoid a out of space error if the prior download operation
happens to fail (or if / becomes rw again)
Diffstat (limited to 'etc')
-rw-r--r-- | etc/rc.initial_firmware_update | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/etc/rc.initial_firmware_update b/etc/rc.initial_firmware_update index 0412dfd..2ae98fb 100644 --- a/etc/rc.initial_firmware_update +++ b/etc/rc.initial_firmware_update @@ -44,6 +44,9 @@ switch ($command) { $status = does_url_exist($url); if($status) { conf_mount_rw(); + touch($d_fwupenabled_path); + if(file_exists("/root/firmware.tgz")) + unlink("/root/firmware.tgz"); echo "\nFetching file size...\n"; $file_size = exec("fetch -s \"$url\""); $file_size = trim($file_size, "\r"); @@ -98,6 +101,7 @@ switch ($command) { die; } if(file_exists($path)) { + touch($d_fwupenabled_path); do_upgrade($path); } else { echo "\nCould not find file.\n\n"; |