diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2008-01-11 17:53:08 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2008-01-11 17:53:08 +0000 |
commit | 60b7af167da0818624180dd02dbb55f73e026b55 (patch) | |
tree | c6342d1fa5109e0bda7df8ba71862b79ef39239e /etc/rc.initial.firmware_update | |
parent | f5fc3deb72273426ebbecd97c1cfedee682a4dea (diff) | |
download | pfsense-60b7af167da0818624180dd02dbb55f73e026b55.zip pfsense-60b7af167da0818624180dd02dbb55f73e026b55.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/rc.initial.firmware_update')
-rwxr-xr-x | 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 987f3d1..a3d5a29 100755 --- 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"; |