Forum Discussion
zblue_123071
Jul 10, 2013Altocumulus
Using iFiles with iRules - Updating Problem
Hi,
I’ve run into an issue that I cannot seem to find an answer to, so, I’m hoping someone can point me into the right direction.
Basically, I have an iRule that checks if there’s at least 1 ac...
- Jul 11, 2013
Thanks, I was able to figure this out.
Before, I was using vi to edit the file in "/config/filestore/files_d/Common_d/ifile_d/MaintPage.html" and after I made the update, the page wouldn't reflect the update.
Now, I go into tmsh and enter "edit sys file ifile MaintPage.html" and after I make the changes, the page is updated.
Thanks!
nitass
Jul 11, 2013Employee
My problem is that if I make a change to the iFile, that update will not register/refresh and continue to use the old version.how did you modify the file?
This is my testing.
create text file
[root@ve11a:Active:Changes Pending] config cat /var/tmp/simpletext.txt
this is original simple text.
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) create sys file ifile simpletext_file source-path file:/var/tmp/simpletext.txt
Copying file "file:/var/tmp/simpletext.txt" ...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 30 0 30 0 0 65502 0 --:--:-- --:--:-- --:--:-- 0
root@(ve11a)(cfg-sync Changes Pending)(Active)(/Common)(tmos) list sys file ifile simpletext_file
sys file ifile simpletext_file {
checksum SHA1:30:0c34c01d448d15874f45477a8ba8e699a196325b
create-time 2013-07-11:15:16:28
created-by root
last-update-time 2013-07-11:15:16:28
mode 33152
revision 1
size 30
source-path file:/var/tmp/simpletext.txt
updated-by root
}
root@(ve11a)(cfg-sync Changes Pending)(Active)(/Common)(tmos) create ltm ifile simpletext_ifile file-name simpletext_file
root@(ve11a)(cfg-sync Changes Pending)(Active)(/Common)(tmos) list ltm ifile simpletext_ifile
ltm ifile simpletext_ifile {
file-name simpletext_file
}
root@(ve11a)(cfg-sync Changes Pending)(Active)(/Common)(tmos) list ltm virtual bar
ltm virtual bar {
destination 172.28.20.111:80
ip-protocol tcp
mask 255.255.255.255
profiles {
http { }
tcp { }
}
rules {
qux
}
source 0.0.0.0/0
source-address-translation {
type automap
}
vlans-disabled
}
root@(ve11a)(cfg-sync Changes Pending)(Active)(/Common)(tmos) list ltm rule qux
ltm rule qux {
when HTTP_REQUEST {
HTTP::respond 200 content [ifile get simpletext_ifile]
}
}
[root@ve11a:Active:Changes Pending] config curl http://172.28.20.111
this is original simple text.
modify the text file
[root@ve11a:Active:Changes Pending] config cat /var/tmp/simpletext.txt
this is new simple text.
root@(ve11a)(cfg-sync Changes Pending)(Active)(/Common)(tmos) modify sys file ifile simpletext_file source-path file:/var/tmp/simpletext.txt
Copying file "file:/var/tmp/simpletext.txt" ...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 25 0 25 0 0 39308 0 --:--:-- --:--:-- --:--:-- 0
[root@ve11a:Active:Changes Pending] config curl http://172.28.20.111
this is new simple text.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects