Jump to content


Photo

SimpleUmount extension plugin

ENIGMA2

  • Please log in to reply
32 replies to this topic

#1 ambrosa

  • Senior Member
  • 161 posts

+35
Good

Posted 12 November 2011 - 15:39

From my post http://openpli.org/f...ive-mounted-rw/

I realize that every USB mass storage device (HDD or FlashDisk) inserted after E2 is up and running are mounted RW (ReadWrite).
I've made a simple E2 extension (I've called SimpleUmount) to provide a simple way to umount one device simple pressing remote control blue button and select SimpleUmount from extensions list.

- Download the file attached here
- Put it in STB / directory
- cd /
- tar xvzf SimpleUmount-x.xx.tgz
- restart Enigma2


Press on remote control the BLUE key and select SimpleUmount


Feedback and bug report are welcome.
If it will work fine, I will add multilanguage support.

In this new version 0.03 I've added confirm message, warning message if device cannot be umounted (because "busy") and auto reload device list after umount.
STB: Clarke Tech ET9100
Mass storage: internal SATA-II HDD 1TB WD10EACS GreenPower 5400rpm
Mass storage: external USB pen drive 2GB
Firmware: OpenPLi kernel 3.x.x
Tuner A: AVL2108 (DVB-S2) HotBird 13E
Tuner B: AVL2108 (DVB-S2) HotBird 13E
Tuner C: AverMedia A867 (DVB-T HD) (AF9035 + MXL5007T)
TV: plasma PANASONIC GT30 fullHD
Audio: PCM through HDMI (no Dolby decoder)

Re: SimpleUmount extension plugin #2 ambrosa

  • Senior Member
  • 161 posts

+35
Good

Posted 12 November 2011 - 17:14

Rel. 0.04
Added multilanguage support.
Addes English and Italian translation

Next step create IPK archive ^_^
STB: Clarke Tech ET9100
Mass storage: internal SATA-II HDD 1TB WD10EACS GreenPower 5400rpm
Mass storage: external USB pen drive 2GB
Firmware: OpenPLi kernel 3.x.x
Tuner A: AVL2108 (DVB-S2) HotBird 13E
Tuner B: AVL2108 (DVB-S2) HotBird 13E
Tuner C: AverMedia A867 (DVB-T HD) (AF9035 + MXL5007T)
TV: plasma PANASONIC GT30 fullHD
Audio: PCM through HDMI (no Dolby decoder)

Re: SimpleUmount extension plugin #3 Gennar1

  • Senior Member
  • 296 posts

+31
Good

Posted 12 November 2011 - 18:16

Really nice work, works perfectly on my ET9000. I plugged in and then umounted/unplugged my external drive many times, and it was always umounted properly and then recognized again after reconnection.

The only drawback I see is that an inexperienced user may get confused if the internal drive is shown in the list together with the external ones. If you find a way to detect if a drive is internal or external, then you could add a setting like "hide internal drive" active by default. In this way experienced users could still umount their internal drive if they wish, while inexperienced users will have an easier life ;)

Edited by Gennar1, 12 November 2011 - 18:19.


Re: SimpleUmount extension plugin #4 pieterg

  • PLi® Core member
  • 32,766 posts

+245
Excellent

Posted 12 November 2011 - 18:34

you could check the 'removable' flag

Re: SimpleUmount extension plugin #5 ambrosa

  • Senior Member
  • 161 posts

+35
Good

Posted 12 November 2011 - 19:31

@gennar1 : you are right. Thanks for idea

@pieterg: /sys/block/sd?/removable Great ! Tomorrow I add your suggestion in my code.
STB: Clarke Tech ET9100
Mass storage: internal SATA-II HDD 1TB WD10EACS GreenPower 5400rpm
Mass storage: external USB pen drive 2GB
Firmware: OpenPLi kernel 3.x.x
Tuner A: AVL2108 (DVB-S2) HotBird 13E
Tuner B: AVL2108 (DVB-S2) HotBird 13E
Tuner C: AverMedia A867 (DVB-T HD) (AF9035 + MXL5007T)
TV: plasma PANASONIC GT30 fullHD
Audio: PCM through HDMI (no Dolby decoder)

Re: SimpleUmount extension plugin #6 ambrosa

  • Senior Member
  • 161 posts

+35
Good

Posted 13 November 2011 - 07:49

Done. Added "removable" check and config option about show only removable devices

This is my GitHub repo: https://github.com/a...in-SimpleUmount
STB: Clarke Tech ET9100
Mass storage: internal SATA-II HDD 1TB WD10EACS GreenPower 5400rpm
Mass storage: external USB pen drive 2GB
Firmware: OpenPLi kernel 3.x.x
Tuner A: AVL2108 (DVB-S2) HotBird 13E
Tuner B: AVL2108 (DVB-S2) HotBird 13E
Tuner C: AverMedia A867 (DVB-T HD) (AF9035 + MXL5007T)
TV: plasma PANASONIC GT30 fullHD
Audio: PCM through HDMI (no Dolby decoder)

Re: SimpleUmount extension plugin #7 ambrosa

  • Senior Member
  • 161 posts

+35
Good

Posted 13 November 2011 - 08:07

Please, don't use 0.05 : bug just discovered. Sorry. Wait 0.06
STB: Clarke Tech ET9100
Mass storage: internal SATA-II HDD 1TB WD10EACS GreenPower 5400rpm
Mass storage: external USB pen drive 2GB
Firmware: OpenPLi kernel 3.x.x
Tuner A: AVL2108 (DVB-S2) HotBird 13E
Tuner B: AVL2108 (DVB-S2) HotBird 13E
Tuner C: AverMedia A867 (DVB-T HD) (AF9035 + MXL5007T)
TV: plasma PANASONIC GT30 fullHD
Audio: PCM through HDMI (no Dolby decoder)

Re: SimpleUmount extension plugin #8 ambrosa

  • Senior Member
  • 161 posts

+35
Good

Posted 13 November 2011 - 08:19

Ok new release 0.06 works fine
https://github.com/a...in-SimpleUmount

Enjoy

If someone has translation, let me know please: I will add in package
STB: Clarke Tech ET9100
Mass storage: internal SATA-II HDD 1TB WD10EACS GreenPower 5400rpm
Mass storage: external USB pen drive 2GB
Firmware: OpenPLi kernel 3.x.x
Tuner A: AVL2108 (DVB-S2) HotBird 13E
Tuner B: AVL2108 (DVB-S2) HotBird 13E
Tuner C: AverMedia A867 (DVB-T HD) (AF9035 + MXL5007T)
TV: plasma PANASONIC GT30 fullHD
Audio: PCM through HDMI (no Dolby decoder)

Re: SimpleUmount extension plugin #9 Frogman

  • Senior Member
  • 389 posts

+68
Good

Posted 13 November 2011 - 09:10

i give you a first german translation :)

Attached Files


Most problems can be solved simply by a closer look.

Re: SimpleUmount extension plugin #10 daddelfalk

  • Senior Member
  • 489 posts

+17
Neutral

Posted 13 November 2011 - 09:44

Hi,

maybe umount procedure is just a tiny bit of a more complex Devicemanager Plugin as seen in here:

http://www.newnigma2...65606#post65606

Just my two cents on this ;)



Re: SimpleUmount extension plugin #11 Dimitrij

  • PLi® Core member
  • 10,379 posts

+354
Excellent

Posted 13 November 2011 - 10:26

-Russian language

GigaBlue UHD Quad 4K /Lunix3-4K/Duo 4K


Re: SimpleUmount extension plugin #12 ambrosa

  • Senior Member
  • 161 posts

+35
Good

Posted 13 November 2011 - 11:44

Thanks people for DE and RU translation.

This is the updated version with RU and DE languages
STB: Clarke Tech ET9100
Mass storage: internal SATA-II HDD 1TB WD10EACS GreenPower 5400rpm
Mass storage: external USB pen drive 2GB
Firmware: OpenPLi kernel 3.x.x
Tuner A: AVL2108 (DVB-S2) HotBird 13E
Tuner B: AVL2108 (DVB-S2) HotBird 13E
Tuner C: AverMedia A867 (DVB-T HD) (AF9035 + MXL5007T)
TV: plasma PANASONIC GT30 fullHD
Audio: PCM through HDMI (no Dolby decoder)

Re: SimpleUmount extension plugin #13 ambrosa

  • Senior Member
  • 161 posts

+35
Good

Posted 13 November 2011 - 11:46

Hi,

maybe umount procedure is just a tiny bit of a more complex Devicemanager Plugin as seen in here:

http://www.newnigma2...65606#post65606

Just my two cents on this ;)


Yes. In many images there is something like you suggest.
But I've not found something similar as above in OpenPLI

So I've start to code my plugin. I believe it's simple and fast.
But if anyone what use a more complete DeviceManager ... yes he can ! :D

Edited by ambrosa, 13 November 2011 - 11:47.

STB: Clarke Tech ET9100
Mass storage: internal SATA-II HDD 1TB WD10EACS GreenPower 5400rpm
Mass storage: external USB pen drive 2GB
Firmware: OpenPLi kernel 3.x.x
Tuner A: AVL2108 (DVB-S2) HotBird 13E
Tuner B: AVL2108 (DVB-S2) HotBird 13E
Tuner C: AverMedia A867 (DVB-T HD) (AF9035 + MXL5007T)
TV: plasma PANASONIC GT30 fullHD
Audio: PCM through HDMI (no Dolby decoder)

Re: SimpleUmount extension plugin #14 Gennar1

  • Senior Member
  • 296 posts

+31
Good

Posted 13 November 2011 - 18:13

The hiding of removable devices works fine, but my USB 2TB Verbatim drive is marked as "not removable" so it is still shown together with the internal drive:

root@et9x00:~# cat /sys/block/sdb/removable
0

Any idea?

Re: SimpleUmount extension plugin #15 ambrosa

  • Senior Member
  • 161 posts

+35
Good

Posted 13 November 2011 - 20:52

The hiding of removable devices works fine, but my USB 2TB Verbatim drive is marked as "not removable" so it is still shown together with the internal drive:

root@et9x00:~# cat /sys/block/sdb/removable
0

Any idea?


Mmhhhhh which type of filesystem ?

I've tried with:
- USB stick ext2
- USB stick vfat
- USB HDD 2.5" NTFS
all these are marked as 'removable' (= 1)

My internal SATA ext4 is marked (obviously) as not removable (= 0)

Your HDD is externally powered (I think 2TB USB HDD 2.5" doesn't exist .....) ? This can make difference ?

Too big ?
STB: Clarke Tech ET9100
Mass storage: internal SATA-II HDD 1TB WD10EACS GreenPower 5400rpm
Mass storage: external USB pen drive 2GB
Firmware: OpenPLi kernel 3.x.x
Tuner A: AVL2108 (DVB-S2) HotBird 13E
Tuner B: AVL2108 (DVB-S2) HotBird 13E
Tuner C: AverMedia A867 (DVB-T HD) (AF9035 + MXL5007T)
TV: plasma PANASONIC GT30 fullHD
Audio: PCM through HDMI (no Dolby decoder)

Re: SimpleUmount extension plugin #16 Gennar1

  • Senior Member
  • 296 posts

+31
Good

Posted 13 November 2011 - 21:11

Yes, it's externally powered. Moreover it has an USB 3.0 interface. Tomorrow I will check with other drives to see if it's an isolated issue. Anyway, it's not an issue of your plugin, which is working perfectly fine.

Re: SimpleUmount extension plugin #17 ambrosa

  • Senior Member
  • 161 posts

+35
Good

Posted 14 November 2011 - 14:32

Try inserting it in a Linux PC and test
/sys/block/sdb/removable


I think that there will be no differences with CT9x00 but test this can be a nice idea. Just to compare different architectures.

STB: Clarke Tech ET9100
Mass storage: internal SATA-II HDD 1TB WD10EACS GreenPower 5400rpm
Mass storage: external USB pen drive 2GB
Firmware: OpenPLi kernel 3.x.x
Tuner A: AVL2108 (DVB-S2) HotBird 13E
Tuner B: AVL2108 (DVB-S2) HotBird 13E
Tuner C: AverMedia A867 (DVB-T HD) (AF9035 + MXL5007T)
TV: plasma PANASONIC GT30 fullHD
Audio: PCM through HDMI (no Dolby decoder)

Re: SimpleUmount extension plugin #18 Gennar1

  • Senior Member
  • 296 posts

+31
Good

Posted 14 November 2011 - 15:57

In fact it's the same even under Ubuntu. Also I tested a few more devices: another big external drive (USB 2.0 this time) shows the same behaviour, while small USB flash drives are correctly marked as removable.
Probably the problem is that those big external drives are just normal 3.5" SATA desktop disks into an USB enclosure, so they are probably detected by the kernel as not removable drives.

No big deal anyway, your plugin works fine.

Re: SimpleUmount extension plugin #19 Graffy

  • Member
  • 16 posts

+1
Neutral

Posted 14 November 2011 - 17:49

Great job @ambrosa !

One suggestion :
<widget name="wdg_label_legend_2" position="140,60" size="170,30" font="Regular;20" />

Polish translation :

Attached Files

  • Attached File  pl.zip   2.13KB   3 downloads


Re: SimpleUmount extension plugin #20 ambrosa

  • Senior Member
  • 161 posts

+35
Good

Posted 14 November 2011 - 18:43

I attach here new version 0.08

- completely rewritten mount point parsing code. A user (MiLo) report me crash.
Now I don't use anymore unrealiable 'os.popen' but much safer Console.ePopen() and read /proc/mounts file

- added Polish translation (Thanks Graffy)


GitHub : https://github.com/a...in-SimpleUmount

Attached Files


STB: Clarke Tech ET9100
Mass storage: internal SATA-II HDD 1TB WD10EACS GreenPower 5400rpm
Mass storage: external USB pen drive 2GB
Firmware: OpenPLi kernel 3.x.x
Tuner A: AVL2108 (DVB-S2) HotBird 13E
Tuner B: AVL2108 (DVB-S2) HotBird 13E
Tuner C: AverMedia A867 (DVB-T HD) (AF9035 + MXL5007T)
TV: plasma PANASONIC GT30 fullHD
Audio: PCM through HDMI (no Dolby decoder)



6 user(s) are reading this topic

0 members, 6 guests, 0 anonymous users