tweak for slow Media list with network-shares-automount on a HDR-fox T2

mb13

New Member
Hi All

First, I really appreciate the customised firmware - clearly a lot of effort gone in to it. I wanted a way to back stuff up (decrypted) to my PC in case my HDR-fox T2 died and now I can.

Reason for the tweak: I access a share on my PC from the HDR. If the PC is shutdown while the HDR is on, browsing the top-level "My Video" folder then always takes a good 20 seconds before the HDR displays the folder, even after the PC has finished shutting down. It's the same whether on first pressing the media button on the remote or selecting "Upper Folder" from a sub-folder. Restarting the HDR resolves this delay but that of course is not always convenient ;-). I get the same delay browsing the "/My Video/[Shares] Do not delete!" folder.

The delay is because the share on my HDR is not unmounted by the standard script when the PC is shutdown - this seems to be because, although the mount command puts it at "/media/My Video/", it actually shows up in the "mount" listing at /mnt/hd2/My Video/. Also the first attempt to unmount sometimes fails because the device is "in use".

With my tweak, there are still delays while the PC is actually shutting down but then the share gets unmounted and everything is back to normal within another 10 or 20 secs.

I've not seen this delay mentioned in the forum but maybe I just didn't look hard enough. Maybe my setup is just a bit weird!

Anyway, I hope it's useful to someone :).



A few notes (OK, several!):

1. I'm a forum newbie so apologies if I've not done this in quite the right way.

2. I've probably gone a bit over the top as I was learning shell scripting and Linux at the same time. I'm more used to Visual Basic on Windows.

3. At 200 lines, it seemed a bit big for embedded code, hence the uploaded file – sorry if that's wrong.
4. The main changes have comments starting #####.
5. Also, I edited the script on Windows so I took the liberty of using tabs for all the indents etc. If you open it in Notepad on Windows, it copies and pastes into the File Editor of the CFW OK. Also I (very in-elegantly!) datestamped the log entries so I could see what was happening when more easily.

6. WebIF version: 1.2.3-5; Custom f/w version: 3.03 (build 2368); Humax Version: 1.03.12 (kernel HDR_CFW_3.03)​
 

Attachments

  • TweakedScanmounts.zip
    2.2 KB · Views: 10
Last edited:

Black Hole

May contain traces of nut
Why the tiny text???

Go into your post editor, and click the spanner icon at the right hand end of the tool bar. This switches you to raw BB Code mode, where you can see the formatting codes. Remove all the tags that refer to font. You can return to WYSIWYG mode by clicking "use rich text" at bottom left.

For more tips see Newbies' Guide to the Forum (click)
 
OP
M

mb13

New Member
Why the tiny text???
Go into your post editor, and click the spanner icon at the right hand end of the tool bar. This switches you to raw BB Code mode, where you can see the formatting codes. Remove all the tags that refer to font. You can return to WYSIWYG mode by clicking "use rich text" at bottom left.

Hope that's better. Comes of being a newbie - and I did read the guide. Just pasted from Notepad into the edit box and it looked huge so I shrank it a bit. The preview didn't look too bad (or so I thought ... clearly wrongly !) Promise to try harder next time ;-)
 

Black Hole

May contain traces of nut
Pasting text from another source works best when pasted into the raw editor rather than the WYSIWYG editor, so that the RTF formatting isn't imported with it. No probs... back to business!

Your mod sounds interesting, but I must defer to comments from those with more technical knowledge.
 

Trev

The Dumb One
MB13 said:
At 200 lines, it seemed a bit big for embedded code,
Code:
You can use the code tags, which puts stuff in a scrollable window like this. (not enough text here to make it scrollable)
 

af123

Administrator
Staff member
I think Drutt (the network-shares-automount maintainer) is looking at this one in the background.
 
Top