Update option in .xml files ???
Re: Update option in .xml files ??? #2
Posted 12 November 2007 - 18:18
The update line is used for "automatic update". I think you've found it in software.xml. It will download the tarball (which contains the PPanel) at the specified url if a new version is available. To let this work, you will also need to host a .ver file on your server which contains a version number and md5 sum (see /var/etc/software.ver as example).What does actually this option do, in top of the .xml files???
Can it be usefull for such a way, in a ppanel?? Does it used for the update procedure of the current ppanel???
Note that the automatic update influences ALL the PPanels installed which support this. So if you select "Enable automatic menu downloads" in Software Management, it will work for all PPanels.
Do you need more infomation about this? It's for internal PLi use for Software Management and Backup/restore.
Re: Update option in .xml files ??? #3
Posted 12 November 2007 - 19:39
It contains already the options to enabe or disable the autoupdate procedure. Also i have made a simple script which is called when we want to update the panel. The problem is how to call this script when i run the panel and the autoupdate option is enabled. I thought that i must use a RunAfterOut option which calls this script and checks if a new version is available to download. But i get an output screen on every exit of the panel (as expected) even there is a new version or not. This is very annoying. So my question had to do to that point.
I still can not understand how ppanelupdate.sh is called (the exact procedure) using that <update> option. Am i missing anything else ?? If i use that option, how can i make my panel to call mine autoupdate script file ??? I think that i am not able to do it because your trick taking place via an internal standard procedure. Am i right ???
GSF Team
Re: Update option in .xml files ??? #4
Posted 12 November 2007 - 20:00
GSF Team
Re: Update option in .xml files ??? #5
Posted 12 November 2007 - 20:26
<directory name="...">
<update url="http://myserver/ppanel.tar.gz" target="/" />
[...] your own things here [...]
<execute name="Download latest menu" condition="[ ! -f /var/etc/ppanelautodownload ]" target="ppanelupdate.sh http://myserver/ppanel.tar.gz /; rm -f /tmp/ppanelrefresh" confirmation="Are you sure to download the latest menu?" quit="restart" helptext="Download the latest PPanel"/>
<execute name="Enable automatic menu downloads" condition="[ ! -f /var/etc/ppanelautodownload ]" target="touch /var/etc/ppanelautodownload; echo Automatic downloads enabled" quit="restart" helptext="Automatically download menus if a new version is available"/>
<execute name="Disable automatic menu downloads" condition="[ -f /var/etc/ppanelautodownload ]" target="rm -f /var/etc/ppanelautodownload; echo Automatic downloads disabled" quit="restart" helptext="Disable the automatic download of menus"/>
</directory>
So http://myserver/ppanel.tar.gz must contain all PPanels. First try this and see if "Download latest menu" works. If you got that working I'll explain how to make a .ver file.
Re: Update option in .xml files ??? #6
Posted 12 November 2007 - 21:07
................... If you got that working I'll explain how to make a .ver file.
Thank you very much dAF. Tottaly cleared !!!
No need to explain me anything about the ver file.
Here is a small script i made, just to make my xxxx.ver file easily ...
#!/bin/sh VERFILE=`echo $2 | sed s/.tar.gz/.ver/` echo "VERSION=$1" > $VERFILE md5sum $2 >> $VERFILE exit 0
I gave it the name make_ver.sh and i run it as follows :
make_ver.sh 001 GSF_Multi_Ppanels.tar.gz
and here the result -> the file GSF_Multi_Ppanels.ver
VERSION=001 943ec8ec2b2e5e758f9e057f6b50becc GSF_Multi_Ppanels.tar.gz
I deep analysed your ppanelupdate.sh file and i don't think that i have any trouble with the update procedure.
Give me one day to make my tests with diferents versions of ppanels (or with no /var/etc/xxx.ver file in box just to make a force update), and you will have our Multi PPanel project for your testing purposes.
GSF Team
Re: Update option in .xml files ??? #7
Posted 12 November 2007 - 21:27
If you have no .ver file on your box, you will get a forced update. If you don't have a .ver file on your server, you won't get automatic updates (I think, not sure) but manual update will still work.
You can easily check that: remove the .ver file from the server and you will see "Downloading from a non-PLi server" if you do a manual update. If you don't get that message, PPanel found the .ver file on the server.
Re: Update option in .xml files ??? #8
Posted 12 November 2007 - 21:37
Your make_ver.sh is right, I can see you analysed ppanelupdate.sh very well
Xexexe no prob with that. Scripting is my favourite stuff in DMs !!!!
Now I am going little deeper with C++ but i have not enough spare time to spent with that language.
By the way I am a little bit currious about the <update> option in .xml files and the relationship with ppanelupdate.sh file. How did you do that ? Just for educational purposes ......
Thanks in advance!!
GSF Team
Re: Update option in .xml files ??? #9
Posted 12 November 2007 - 21:53
If PPanel reads the <update> it just starts ppanelupdate.sh with the url in background. If ppanelupdate is finished, PPanel will show a popup ("new menu available..." ) and reloads the PPanel after you've quit it (to prevent that the PPanel changes while you're using it).By the way I am a little bit currious about the <update> option in .xml files and the relationship with ppanelupdate.sh file. How did you do that ? Just for educational purposes ......
Thanks in advance!!
Re: Update option in .xml files ??? #10
Posted 12 November 2007 - 22:18
With that trick i assume that when i have set the software menu to be updated automatically, the same situation will occur in my ppanel. When i disable the AU option in my panel, AU will be disabled and in the Software menu panel!! Am I right ???
GSF Team
Re: Update option in .xml files ??? #11
Posted 12 November 2007 - 22:47
Right!All those you describe will happen if /var/etc/ppanelautodownload exists. Am i correct ??
Right!With that trick i assume that when i have set the software menu to be updated automatically, the same situation will occur in my ppanel. When i disable the AU option in my panel, AU will be disabled and in the Software menu panel!! Am I right ???
It's a global setting because it was only meant for the Software Management PPanel. So, use it with care in your PPanel as it influences Software Management as well. That's why it is for internal use. Maybe you could use some runBefore and runAfter statements to preserve /var/etc/ppanelautodownload. I should check the PPanel source code to see if it's possible.
Re: Update option in .xml files ??? #12
Re: Update option in .xml files ??? #13
Posted 13 November 2007 - 22:21
Yes dAF2000 you are right!! I made my panel to have seperate update option using runBefore and runAfter.
Here is the code .....
[quote]<directory name="My Panel" runBefore="if [ -f /var/etc/mypanelau ];then if [ ! -f /var/etc/ppanelautodownload ];then touch /var/etc/ppanelautodownload;touch /var/etc/convert.enable;fi;else if [ -f /var/etc/ppanelautodownload ];then rm -f /var/etc/ppanelautodownload;touch /var/etc/convert.disable;fi;fi" runAfter="if [ -f /var/etc/convert.enable ];then rm -f /var/etc/ppanelautodownload;rm -f /var/etc/convert.enable;fi;if [ -f /var/etc/convert.disable ];then touch /var/etc/ppanelautodownload;rm -f /var/etc/convert.disable;fi">
<update url="http://myserver/My_panel.tar.gz" target="/"/>
......
......
......
<execute name="Download latest Panel"
condition="[ ! -f /var/etc/mypanelau ]"
target="ppanelupdate.sh http://myserver/My_panel.tar.gz /; rm -f /tmp/ppanelrefresh"
quit="restart"/>
<execute name="Enable Auto Update"
condition="[ ! -f /var/etc/mypanelau ]"
target="touch /var/etc/mypanelau; echo Automatic Update enabled"
quit="restart"/>
<execute name="Disable Auto Update"
condition="[ -f /var/etc/mypanelau ]"
target="rm -f /var/etc/mypanelau; echo Automatic Update disabled"
quit="restart"/>
.....
....
[/quote]
And my question now .....
How many separators can we have in a panel (one sceen at time)??? With 2 i am ok but when i use one more, then enigma stucks!!!
GSF Team
Re: Update option in .xml files ??? #14
Posted 14 November 2007 - 10:02
About the separators: there is no limit on that. The backup/restore PPanel has 4 separators for example. Maybe a memory problem?
Re: Update option in .xml files ??? #15
Posted 14 November 2007 - 10:52
If you have another suggestion, please inform me .....That a quite long runBefore and runAfter, but it works.
In all my ppanels i have the same problem!!! No memory problem i think, as the image is installed in a 2GB usb stick, with swap memory of 32 MB!!!About the separators: there is no limit on that. The backup/restore PPanel has 4 separators for example. Maybe a memory problem?
GSF Team
Re: Update option in .xml files ??? #16
Posted 14 November 2007 - 11:21
Re: Update option in .xml files ??? #17
Posted 15 November 2007 - 00:03
I thought that i made a swap file in my usb stick, via the Dreambox Settings menu but unfortunatelly no swap file created!!!
I searched in rc.config and there are the following options .....
but those options are not readed from any boot script file!!!!SWAP_ON=usb
SWAP_SIZE=32
I created the swapfile manually by telnet and first I tried to enable the swap partition via the fstab file but with no success!!
So i edited the misc_services boot script file, to create the swapfile in usb (in case file does not exist) and to enable the swap when booting, with success at this time.
Now i have an extra 32 MB memory space. I tried to run my panel and yes it succeded!!!! Here is 2 snapshots ...
When i remove the third and fourth <separator> the panel runs all time !!!!
I 'll send you the panel via pm to check it in your box.
GSF Team
Re: Update option in .xml files ??? #18
Posted 12 August 2009 - 12:03
I use the reference code in my own ppanel:
<directory name="test"> <update url="http://xxx.yyy/zzz.tar.gz" target="/" /> <comment name="test 1" /> <execute name="Download latest menu" condition="[ ! -f /var/etc/ppanelautodownload ]" target="ppanelupdate.sh http://xxx.yyy/zzz.tar.gz /; rm -f /tmp/ppanelrefresh" confirmation="Are you sure to download the latest menu?" quit="restart" helptext="Download the latest PPanel"/> <execute name="Enable automatic menu downloads" condition="[ ! -f /var/etc/ppanelautodownload ]" target="touch /var/etc/ppanelautodownload; echo Automatic downloads enabled" quit="restart" helptext="Automatically download menus if a new version is available"/> <execute name="Disable automatic menu downloads" condition="[ -f /var/etc/ppanelautodownload ]" target="rm -f /var/etc/ppanelautodownload; echo Automatic downloads disabled" quit="restart" helptext="Disable the automatic download of menus"/> </directory>
When I running manualy ppanelupdate.sh everything's looks ok:
root@dm600pvr ~ # ppanelupdate.sh http://xxx.yyy/zzz.tar.gz / PPanelupdate version 0.12 ppanel.ver 100% |*****************************| 66 00:00 ETA Connecting to xxx.yyy[xxx.xxx.xxx.xxx]:80 Version on Dreambox: 001 Version on server: 002 Connecting to xxx.yyy[xxx.xxx.xxx.xxx]:80 ppanel.tar.gz.tmp 100% |*****************************| 542 00:00 ETA Check 1: tarball checksum valid Check 2: xml files in tarball valid Menu updated!
but...
When I enable automatic download, ppanel does not show a popup ("new menu avaiable...").
After exit, I run again my ppanel and i see new version ("test 2").
What the hell?
P.S. Sorry for my poor english
Re: Update option in .xml files ??? #19
Re: Update option in .xml files ??? #20
9 user(s) are reading this topic
0 members, 9 guests, 0 anonymous users