Home brewed PPanel
VU+NL 2 Mar 2011
If you are interested, please try my home brewed PPanel: a small package of systemtools. In fact it's only a collection of telnet-commands.
Any suggestions are welcome.
If anybody could add autostart for SWAP-file: please do so.
Any suggestions are welcome.
If anybody could add autostart for SWAP-file: please do so.
Attached Files
Taykun345 3 Mar 2011
thanks, please add this:
init 4
rm /media/hdd/epg.dat
init 3
It deletes EPG on HDD.
init 4
rm /media/hdd/epg.dat
init 3
It deletes EPG on HDD.
VU+NL 3 Mar 2011
OK, it works now with some sleep in between ("init 4; sleep 5; rm /media/hdd/epg.dat; sleep 5; init 3").
Nobody knows the command for SWAP-AutoStart?
Nobody knows the command for SWAP-AutoStart?
Attached Files
delagroov 3 Mar 2011
Perhaps delete all crashlogs would be a nice option too.
rm -rf /media/hdd/enigma2_crash*
blzr 4 Mar 2011
here's my try - SWAPpanel (of course it can be inserted into 'SystemTools' if you'd like...),Nobody knows the command for SWAP-AutoStart?
I've simplified (?) things a little, available options:
- create swapfile on hdd / usb
- activate swapfile on hdd/usb (adds fstab entries and 'hackforusbswap' file )
- deactivate all swaps (all swaps added to fstab)
- show active swaps
<directory name="SWAP Panel"> <comment name="Several functions related to SWAP-files"/> <separator/> <execute name="Create a SWAP-file on your internal HDD" target="dd if=/dev/zero of=/media/hdd/swapfile bs=1048576 count=128; mkswap /media/hdd/swapfile; echo --- Done! Now activate SWAP!" helptext="Creates a 128MB SWAP-file on your HDD." confirmation="Create the SWAP-file on your HDD?"/> <execute name="Create a SWAP-file on mounted USB-medium" target="dd if=/dev/zero of=/media/usb/swapfile bs=1048576 count=128; mkswap /media/usb/swapfile; echo --- Done! Now activate SWAP!" helptext="Creates a 128MB SWAP-file on your USB-Medium" confirmation="Create the SWAP-file on your USB device?"/> <separator/> <execute name="Activate SWAP-file on HDD" target="echo If there is no text below the line, the activation went well.; echo --------------------------------------------------------; swapon /media/hdd/swapfile; sed -i '/hdd\/swapfile/d' /etc/fstab; echo -e '/media/hdd/swapfile swap swap defaults 0 0' >> /etc/fstab" helptext="Activates SWAP on HDD, provided 'swapfile' exists." confirmation="Are you sure you want to activate the SWAP-file on your HDD?"/> <execute name="Activate SWAP-file on mounted USB-Medium" target="echo If there is no text below the line, the activation went well.; echo -------------------------------------------------------; swapon /media/usb/swapfile; sed -i '/usb\/swapfile/d' /etc/fstab; echo -e '/media/usb/swapfile swap swap defaults 0 0' >> /etc/fstab; echo 'mount -a ; swapon -a' >> /etc/rc3.d/S90hackforusbswap; chmod 755 /etc/rc3.d/S90hackforusbswap" helptext="Activates SWAP on USB, provided 'swapfile' exists." confirmation="Are you sure you want to activate the SWAP-file on your USB-medium?"/> <separator/> <execute name="De-activate SWAP-files" target="echo If there is no text below the line, the de-activation went well.; echo ----------------------------------------------------; swapoff -a; sed -i '\/swapfile/d' /etc/fstab; rm -f /etc/rc3.d/S90hackforusbswap" helptext="De-activates all SWAP-files." confirmation="Are you sure you want to de-activate all SWAP-files?" /> <separator/> <execute name="Show active swaps" target="cat /proc/swaps" helptext="Shows active swaps."/> </directory>
tested it a bit and for me it worked, of course any feedback is welcome
//btw. does someone know if option quit="restart" should work on enigma2 ppanel? for me it doesn't work...
and with combination of 'quit' and 'condition' it'd be possible to show/hide some options in this panel...
Attached Files
VU+NL 4 Mar 2011
Ja, bij toeval. Ik was op zoek naar iets en kwam erachter dat PPanel eigenlijk wel een (voor een leek) simpel te gebruiken en flexibel gereedschap is.Zo.... krijgt ppanel nieuw leven????
blzr 5 Mar 2011
well, looks nicer and nicer, gr8 jobLatest version attached.
two remarks regarding swap section:
1) 'activate cf swapfile' - if you wanna fstab entry for cf-swap to be added automatically during activation, you've to add to 'target' appropriate command (see hdd/usb swap activation, accordingly)
//actually I don't know if cf swap needs kind of 'hackforcfswap' (like usb) to overcome too slow device mount, only a dm8k user could tell...
2) 'de-activate hdd-swapfile / usb-swapfile' options - they de-activate swap, but fstab entries (created during activation) remain, contrary to my 'de-activate ALL swap' command which remove all fstab swap entries... as a result after reboot de-activated hdd/usb swap is activated automatically, is it intentional? if not, consider an adding of 'fstab cleaning' commands
VU+NL 5 Mar 2011
Thanks for that.
Please have a look if this is what you meant. If not: please feel free to make changes.
Please have a look if this is what you meant. If not: please feel free to make changes.
Attached Files
blzr 5 Mar 2011
well, not exactly
I'm rather against 'unnecessary multiplication of entities'
I would suggest such way:
- remove 'temporary' swaps options - 'permanent' swap can be used temporarily as well, for user it makes no difference...
- since every 'activate swap' option would add proper fstab entry, I would insert 'delete fstab entry' for each 'de-activate' option
//btw. I can't imagine why someone would really need 2(3?) swapfiles 'active' at once? then option to de-activate specific (hdd/usb/cf) swaps would be useful, otherwise to have only one option 'de-activate all swaps' is sufficient, imho...
but of course I can't speak for others since I don't use swap at all
attached you'll find my 'swap options slimmed' version
//if you prefer to stick to yours version, correct typos in 'active cf swap' - name of S90something file differs for create and chmod...
keep up the good work
I'm rather against 'unnecessary multiplication of entities'
I would suggest such way:
- remove 'temporary' swaps options - 'permanent' swap can be used temporarily as well, for user it makes no difference...
- since every 'activate swap' option would add proper fstab entry, I would insert 'delete fstab entry' for each 'de-activate' option
//btw. I can't imagine why someone would really need 2(3?) swapfiles 'active' at once? then option to de-activate specific (hdd/usb/cf) swaps would be useful, otherwise to have only one option 'de-activate all swaps' is sufficient, imho...
but of course I can't speak for others since I don't use swap at all
attached you'll find my 'swap options slimmed' version
//if you prefer to stick to yours version, correct typos in 'active cf swap' - name of S90something file differs for create and chmod...
keep up the good work
Attached Files
VU+NL 5 Mar 2011
I am happy with your "slimming" and corrections, thanks.
I don't use SWAP either: I only added those functions as there are quite often questions in this and other forums on how to establish them under PLi.
If you have any other improvements or additions I would be honoured.
I don't use SWAP either: I only added those functions as there are quite often questions in this and other forums on how to establish them under PLi.
If you have any other improvements or additions I would be honoured.
Bernado 5 Mar 2011
great collection, thnx to VU+NL and blzr
CF and SD/MMC cards don´t need inittweaks afaik - tested with sd card.
below is a version with 'hackforcfswap' removed and support for /media/mmc1 added - feel free to edit
...actually I don't know if cf swap needs kind of 'hackforcfswap' (like usb) to overcome too slow device mount, only a dm8k user could tell...
CF and SD/MMC cards don´t need inittweaks afaik - tested with sd card.
below is a version with 'hackforcfswap' removed and support for /media/mmc1 added - feel free to edit
Attached Files
blzr 5 Mar 2011
@Bernado
thanks for info and updated ppanel
I corrected 2 typos (ed instead of sed), also removed redundant 'leftovers' from previous version...
latest ppanel attached (@VU+NL, I pushed version to 0.49, is this correct number?)
thanks for info and updated ppanel
I corrected 2 typos (ed instead of sed), also removed redundant 'leftovers' from previous version...
latest ppanel attached (@VU+NL, I pushed version to 0.49, is this correct number?)