NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Other Clients Old Stuff (legacy) MVP & NMT MVPMCX2 and other NMT stuff v
« Previous 1 … 18 19 20 21 22 … 37 Next »
the auto-script!

 
  • 0 Vote(s) - 0 Average
the auto-script!
pBS
Offline

Posting Freak

Posts: 4,829
Threads: 182
Joined: Aug 2005
#1
2009-06-11, 04:32 PM
well, i'm almost there....an auto-script that writes itself...Big Grin
basically i just get server name info from /tmp/setting.txt [server1=] and insert that into the script, thereby making it edit itself! Smile one size fits all...

i'm just using grep and a bash regex to parse it out...
Quote:server1=` grep servname1 /tmp/setting.txt `;
server1=${server1#*=};
then insert that variable into a auto-loading page..thereby constructing a valid link from info on the pch itself, so it has to be right..Smile

only limitation so far is it has to be first share name...but i think i can get around that too by looking for mvpmcx2 existence on each of them..[tho that'll take some tweaking]

i knew there was an answer floatin around in my head somewhere, sorry if i've been a bit odd lately, been on pain killers for a broken rib...lol
hopefully this can help users with easier setup, for shares at least..
will post preliminary scripts soon...
Hardware: HDHR Prime, HDPVR 1212, Raspberry pi2, VFD display w/LCDSmartie
pBS
Offline

Posting Freak

Posts: 4,829
Threads: 182
Joined: Aug 2005
#2
2009-06-11, 05:16 PM
hmm, now how to load the initial script? told ya i was loopy...lol
working on it...
Hardware: HDHR Prime, HDPVR 1212, Raspberry pi2, VFD display w/LCDSmartie
pBS
Offline

Posting Freak

Posts: 4,829
Threads: 182
Joined: Aug 2005
#3
2009-06-12, 01:32 AM
aha! almost got it..i got a cgi script to run with relative paths! Big Grin finally!
using a base href in headers, relative paths work.. it's complicated..
as long as i can run one script without knowing what details are, that script can get the details for me..

basically it means it's actually doable..and probably easier now with relative pathing...
the running of a cgi from relative paths was all that was stopping me..
i just got mvpmcx2 to start from this link in htm page:
Code:
<a href="gbpvr.cgi" type="text/html" name="toplink" ONKEYUPSET="bottomlink">GB-PVR</a>

lots of slow running/testing to do...[my pch is in other room..lol]
Hardware: HDHR Prime, HDPVR 1212, Raspberry pi2, VFD display w/LCDSmartie
pBS
Offline

Posting Freak

Posts: 4,829
Threads: 182
Joined: Aug 2005
#4
2009-06-12, 05:30 AM
bummer, i think i ran into the shares won't load until you access them- bug..Sad
or rather, the shares only load files as text, cgi just prints the contents...

if i access any file on share from a non-relative path first, then it works...
but that's what i was trying to avoid...
so until they fix that, it's not really possible..
since it's been buggy so long i don't expect a fix anytime soon..
so close...and yet still so far...
Hardware: HDHR Prime, HDPVR 1212, Raspberry pi2, VFD display w/LCDSmartie
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,192
Threads: 958
Joined: May 2006
#5
2009-06-12, 07:17 AM
A valiant effort. Getting a consistent script more advanced than what I do now, is so hard that I gave up trying. You definitely need to move the PCH for this kind of work, an old analog or DVI monitor (with HDMI adaptor) come in handy. I can restart my PCH 50 times on a good night of testing.

Martin
pBS
Offline

Posting Freak

Posts: 4,829
Threads: 182
Joined: Aug 2005
#6
2009-06-13, 11:23 PM (This post was last modified: 2009-06-14, 09:26 AM by pBS.)
the funny thing is, so it's supposed to be a bug where the share isn't active till you access it, but you're looking at a page from that share! why doesn't that count as a share access?
[possibly only a cached htm page display really, loaded locally from nvram]

another idea, i have a very simple script that just activates the share, would be the only page needed to be edited, after which paths could be relative and thus generic, eliminating lots of problems in itself.. [meaning still universal scripts, only edit needed is activating page]
i'll see if i can't put together a package you can test and see what i mean...
this would be the only part you'd have to help people edit:
Code:
<html>
<HEAD>
<META http-equiv="Refresh" content="0;url=http://localhost.drives:8883/NETWORK_SHARE/[b]SHARE_NAME[/b]/gbpvr.htm">
</HEAD>
once just this is loaded as index.htm, people would have an easier time writing their own, paths no longer as much an issue.. and making it easier for users to share scripts as they'd be generic..Big Grin

and i'll make a batch file that parses the http://XXX.XXX.XXX.XXX:8883/network_share.html file to make a simple installer file to eliminate errors...Smile
darn, can't access it from batch..would have to be a real program..
and darn2, would have to set ip addr. var too for the other script...maybe....Smile

aha! solved that by just using a copy to /etc/mvpmc instead of mounting it, so i can use the easily discerned share name instead of ip address...

Question: is there any functional problem with doing it like this? [copy instead of mount]
it doesn't even seem to be any slower loading...Smile
Hardware: HDHR Prime, HDPVR 1212, Raspberry pi2, VFD display w/LCDSmartie
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,192
Threads: 958
Joined: May 2006
#7
2009-06-14, 04:09 PM
pBS Wrote:aha! solved that by just using a copy to /etc/mvpmc instead of mounting it, so i can use the easily discerned share name instead of ip address...

Question: is there any functional problem with doing it like this? [copy instead of mount]
it doesn't even seem to be any slower loading...Smile

The PCH uses a RAM disk so you lose about 1.5 MB doing this so I tend to stay away for design reasons but this is how I did it with the Network Browser script. It also means a full power off to reset it.

The odd mkv won't play because of reduced memory, but that hasn't stopped Syabas from adding apps.

Martin
pBS
Offline

Posting Freak

Posts: 4,829
Threads: 182
Joined: Aug 2005
#8
2009-06-18, 10:48 PM
finally got it working, couldn't seem to get a mount --bind to work at all [?] links niether..Sad
but here's what i have so far...only 4 lines...Big Grin
first, get share mapping name with grep on settings.txt
then search the mount cmd output for only that share and save source mapping to $mount1..
with that, i can mount and run no problem...Big Grin

still need an 'activating' page to crank up cgi, but after that it's universal...
you could change your mount name, server ip address or share name, as long as you have a mount mapped on pch, it'll work with no edits..that's where it gets the info from...
Code:
# get share name from pch
SERVER=` grep servname1 /tmp/setting.txt `;
# extract name only
SERVER="${SERVER#*=}";
# run mount and save only server line we want
mount1=`mount -t cifs | grep $SERVER`
# filter off the junk to leave just //ip/share
mount1=${mount1%% *}
$mount1 displays: //serverip/share
and just: mount -t cifs $mount1 /etc/mvpmc/ -o username=guest,ro;
after that....
will have it polished up and ready to upload here soon...really pretty short and sweet..
Hardware: HDHR Prime, HDPVR 1212, Raspberry pi2, VFD display w/LCDSmartie
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,192
Threads: 958
Joined: May 2006
#9
2009-06-18, 11:07 PM
My mvpmc share is on servname3. Your safest bet is to grep for each of the servnames in udn and work backwards, you can even isolate username and password if you want to be fancy.

Martin
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,192
Threads: 958
Joined: May 2006
#10
2009-06-19, 11:41 PM
This might be generic enough

Code:
server=`grep udn /tmp/setting.txt`
server=${server#*smb.name=}
server=${server%%&*}


Martin
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Jaggy's AutoLoad Script Jaggy 3 1,829 2011-10-05, 11:08 PM
Last Post: ACTCMS
  Help with mounting DVD share in NPVR script Paul_B 3 2,039 2011-01-01, 09:51 PM
Last Post: mvallevand
  DVD script helper mvallevand 4 2,991 2009-12-31, 02:50 AM
Last Post: mvallevand
  script to play iso's Blue Racer 23 8,701 2009-05-13, 09:21 PM
Last Post: mvallevand
  Problem with script following NMT firmware upgrade Azimuth 11 4,386 2008-11-02, 07:55 PM
Last Post: Azimuth
  auto-load html page from/after script pBS 2 3,294 2008-06-23, 09:50 AM
Last Post: pBS
  telnet script broken after latest firmware update madas 12 4,408 2008-05-14, 06:16 AM
Last Post: jksmurf

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode