<execute name="What Size disk can we make"
condition="[ -e /media/inside-disk ] && [ -e /media/inside-disk/Allsats/SataSetup_pp.sh ] && [ ! -e /media/BigLoop ] "
runBeforeOut="export FreeSpace=$(df | grep inside | awk '{print $4}');
echo 'you currently have ' $FreeSpace 'available for logical disk' "
target="let 'FreeGb = FreeSpace / 1024000';
let 'SafeSize = FreeSpace /1250000';
echo -e 'FreeSpace is ' $FreeGb 'Gb and recommended disk size is ' $SafeSize 'Gb';
echo -e 'command would be\n\t ./SataSetup_pp.sh Loopy $SafeSize'"
helptext="Calculate maximum logical disk size based on current free space"/>
Can PPanels process variables
Started by jimux, 25 Nov 2011 08:22
8 replies to this topic
#1
Posted 25 November 2011 - 08:22
I am attempting to create a PPanel which uses expressions to create values which are then used later as command line parameters of a shell script. It appears that PPanels cannot create or use environment variables. Is there a way round this?
Technomate box user (TM9100, TM800HD) and moderator on allsats.co.uk
Linux/unix fan for many years.
Re: Can PPanels process variables #2
Re: Can PPanels process variables #3
Re: Can PPanels process variables #4
Re: Can PPanels process variables #5
Re: Can PPanels process variables #6
Re: Can PPanels process variables #7
Posted 28 November 2011 - 09:58
If you really want to use a PPanel, you could write the values to a file in /tmp and read them again from your script. I can't program Python either.
Many answers to your question can be found in our wiki: http://openpli.org/wiki
Re: Can PPanels process variables #8
Posted 29 November 2011 - 12:44
Thank you for all replies.
Yes I do already have to write out to file but I think there is a missed opportunity for more elegant code, as well as an inefficient use of cpu and memory resources.
Yes I do already have to write out to file but I think there is a missed opportunity for more elegant code, as well as an inefficient use of cpu and memory resources.
Technomate box user (TM9100, TM800HD) and moderator on allsats.co.uk
Linux/unix fan for many years.
Re: Can PPanels process variables #9
Posted 29 November 2011 - 20:56
you can write a simple python script to run a bash script without needing to use ppanels, if you already have the script that the ppanel runs, then a very basic python script can run this, and also have some fancy graphics added to it to create a full blown plugin, this has the added benefit of the console output running in real time, instead of filling the screen upon completion of the script with the entire output all at once,
you can even use an xml within the python script to call everything so its the same as working with a ppanel from the 'building' side of things, i recoded an entire ppanel like this, and the user interface is now much better for it
if you want any advise on what i did to achieve this, you know where i am m8
you can even use an xml within the python script to call everything so its the same as working with a ppanel from the 'building' side of things, i recoded an entire ppanel like this, and the user interface is now much better for it
if you want any advise on what i did to achieve this, you know where i am m8
DMM 2x 500s, 2x 7020Si, 600s, 800s, 500HD.
Technomate 500, 500Super, 600, 9100, 800HD, 500HD, TWIN-OE, 2T-OE, Single-OE, NANO-OE. (& all non linux)
Vu+ Duo and others
ALL originals, a clone free environment.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users