OpenPLi 4.0 : Little script to free Flash space

Posted by: Admin

OpenPLi 4.0 : Little script to free Flash space - 08/29/15 04:29 AM

OpenPLi 4.0 : Little script to free Flash space (Commands to be sent by Telnet or SSH in Terminal mode)

Code:
rm /etc/init.d/softcam.CCcam
rm /etc/init.d/softcam.mgcamd
rm /etc/init.d/softcam.oscam

rm /usr/bin/CCcam
rm /usr/bin/mgcamd
rm /usr/bin/oscam

rm -r /usr/share/enigma2/PLi-FullHD
rm -r /usr/share/enigma2/PLi-FullNightHD
rm -r /usr/share/enigma2/PLi-HD1
rm -r /usr/share/enigma2/PLi-HD2

(PLi-HD is used as default in our images, so better to keep it !) :
rm -r /usr/share/enigma2/PLi-HD
Posted by: Admin

Re: OpenPLi 4.0 : Little script to free Flash space - 01/20/16 04:14 PM

From Diceman01,

Code:
init 4
mv /usr/lib/enigma2/python/Plugins/Extensions /media/usb
mv /usr/lib/python2.7/site-packages /media/usb
ln -sfn /media/usb/Extensions /usr/lib/enigma2/python/Plugins/Extensions
ln -sfn /media/usb/site-packages /usr/lib/python2.7/site-packages 
init 3
Posted by: robocop591

Re: OpenPLi 4.0 : Little script to free Flash space - 01/23/16 01:34 AM

hi friend
i've dm8000 with open pli 4.0
i put a key usb 4.0gb, i initialised and no problembut when i write this command with putty the first and second command give an error : "mv: error write...no left space on device..."
i don't understand what's happen.
i want put an usb stick for extended memory and to do a backup of my dm.
thx
Posted by: Admin

Re: OpenPLi 4.0 : Little script to free Flash space - 01/23/16 01:44 AM

So if you have such error it means the USB Stick is not mounted properly, did you check that it is mounted ok ? Did you used the "df -h" command to see the space on the devices on your box ?

I think that you pointed out exactly the issue, the USB is not mounted properly and so files are not copied to the Stick, instead to RAM that is emulating an USB output, and so files are lost.

Admin
Posted by: Dub2Dub

Re: OpenPLi 4.0 : Little script to free Flash space - 02/20/16 04:50 AM

Originally Posted By: Admin
OpenPLi 4.0 : Little script to free Flash space (Commands to be sent by Telnet or SSH in Terminal mode)

Code:
rm /etc/init.d/softcam.CCcam
rm /etc/init.d/softcam.mgcamd
rm /etc/init.d/softcam.oscam

rm /usr/bin/CCcam
rm /usr/bin/mgcamd
rm /usr/bin/oscam

rm -r /usr/share/enigma2/PLi-FullHD
rm -r /usr/share/enigma2/PLi-HD1
rm -r /usr/share/enigma2/PLi-HD2

(PLi-HD is used as default in our images, so better to keep it !) :
rm -r /usr/share/enigma2/PLi-HD


Should have really thought this one through, erm, removing CCCam kinda screwed me and installing a new one doesn't work because it says files missing.

any idea for a quick fix?
Posted by: Admin

Re: OpenPLi 4.0 : Little script to free Flash space - 02/20/16 07:10 AM

This one was for an older version of the OpenPLi 4.0 where MastaG had installed many Cams that were taking most of the Free Flash.

You can just copy any CCcam bin file in /usr/bin and it will work. But best is to reinstall thru the JAM 5.2.

Admin
Posted by: sinmc

Re: OpenPLi 4.0 : Little script to free Flash space - 02/25/16 06:14 AM

in my experience with Openpli 4.0 you can safely move the whole usr/lib/ to usb and link it , everything works fine anyway , tested in dm800hd and dm800se and dm500hd ...
Posted by: Toysoft

Re: OpenPLi 4.0 : Little script to free Flash space - 02/25/16 07:13 AM

Thank you for your contribution and tips ! I am sure it will help a lot of members,

TS
Posted by: sinmc

Re: OpenPLi 4.0 : Little script to free Flash space - 02/25/16 10:41 PM

for better 'sharing' :

This steps are tested in image OpenPli 4.0 on dm800hd , dm800se and dm500hd , but should work in every dm model , you need an usb pen already mounted on box , mounted on default /media/usb/ path
1) in telnet send command to stop enigma2 process
Code:
init 4

2) send command to remove older lib on usb(if you already do this process with last image)
Code:
rm -Rf /media/usb/lib

3) move usr/lib to usb
Code:
mv /usr/lib /media/usb

4) link usb/lib to default system path
Code:
ln -sfn /media/usb/lib /usr/lib

5) restart enigma2 process
Code:
init 3


Now you have all lib folder on usb and save 40% free space in flash

I tipically use this kind of way when i want to test every plugin etc... on new images ...
Posted by: hanzo

Re: OpenPLi 4.0 : Little script to free Flash space - 02/28/16 03:19 AM

@sinmic, i tried this, but when i restart i seem to lose the symbolic link. I read that is probably because the hdd is not mounted inside /etc/fstab. Is that the case?

OpenPli mount the hdd just fine, but on restart the symbolic link does not work, and the image does not load successfully, it hangs.
Posted by: hanzo

Re: OpenPLi 4.0 : Little script to free Flash space - 02/28/16 03:41 AM

Solved, the problem was that the command for the symlink was:

Code:
ln -sfn /media/hdd/lib /usr/lib


I've also added

Code:
/dev/sda1 /media/hdd auto defaults 0 0


to my /etc/fstab file (not sure if that is needed since i've found out about the incorrect symlink command after I've modified /etc/fstab)
Posted by: sinmc

Re: OpenPLi 4.0 : Little script to free Flash space - 02/28/16 09:26 PM

Quote:
ln -sfn /media/hdd/lib /usr/lib


sorry for code , you are right , i chaged position , thank you for correct that

for the second code , i don't use it , my usb is always automounted on media/usb , so if i need an extra /media/hdd ( i don't need it ) u can symlink /media/usb /media/hdd ... and u have usb on both path ...
Posted by: hanzo

Re: OpenPLi 4.0 : Little script to free Flash space - 03/02/16 02:56 AM

Yep, thanks for the symlink trick, that is super useful!