Page 14 of 31 FirstFirst ... 4121314151624 ... LastLast
Results 131 to 140 of 301

Thread: Simple RSS Jukebox

  1. #131
    Join Date
    Mar 2011
    Location
    Riga, Latvia
    Posts
    122

    Default

    thanks a lot, Snappy. Excellent!
    I'll try it today

  2. #132
    Join Date
    Mar 2011
    Location
    Riga, Latvia
    Posts
    122

    Default

    Hello, Snappy,
    I've got some time for playing with your script last night (sorry for delaying, had no time before)
    and I understood that several things weren't cleared for me (as usually )
    Is it necessary to remove comments from your scripts before copy/paste (I mean for example,
    # Set timeout to the number of times you want the loop to repeat, or # Create the mount point directory ) ?
    Which point has to be renamed to nasmount.sh ? (is it #!/bin/sh ? )

    You meant that script has to be copied to /usr/local/etc/ directory. Did I get right that I have to paste your script at the end of /usr/local/etc/rcS ? but it's not a directory but file. It looks that point is not cleared for me at all

  3. #133
    Join Date
    Dec 2009
    Location
    Canada (ON)
    Posts
    2,040

    Default

    Quote Originally Posted by jurijz View Post
    Hello, Snappy,
    I've got some time for playing with your script last night (sorry for delaying, had no time before)
    and I understood that several things weren't cleared for me (as usually )
    Is it necessary to remove comments from your scripts before copy/paste (I mean for example,
    # Set timeout to the number of times you want the loop to repeat, or # Create the mount point directory ) ?
    Which point has to be renamed to nasmount.sh ? (is it #!/bin/sh ? )

    You meant that script has to be copied to /usr/local/etc/ directory. Did I get right that I have to paste your script at the end of /usr/local/etc/rcS ? but it's not a directory but file. It looks that point is not cleared for me at all
    There is no need to remove the comments the shell interpreter will just ignore them anyway. You need to create a new file called /usr/local/etc/nasmount.sh and copy the whole thing in there. I probably should have attached to whole thing as an attachment that you could have just copied to your /usr/local/etc/ but I guess I was not thinking. The easiest way to do this would be to:

    vi /usr/local/etc/nasmount.sh

    Press "i" in vi to enter insert mode; use your mouse to highlight the content to be copied; move to your terminal screen (Probably putty in your case) and copy the content. Still using vi make the required changes (IP change, mount Paths etc..). Now save the file and exit vi; hint= enter ":wq!"

    Note the mount point can be whatever you want on the PBO; in the example below I used /tmp/ramfs/volumes/public but I could have used anything I want really. If you want your shares to be visible under the HDD tab menu though you will have to use a directory under the /tmp/ramfs/volumes/"whatever_you_want_to_call_it"

    Now that the nasmount.sh has been created you can modify your /usr/local/etc/rcS file and add the /usr/local/etc/nasmount.sh at the end of it.

    This should do it for you; I hope it is a little more clear.

    Good luck.
    Last edited by snappy46; 06-22-2011 at 12:04 PM.

  4. #134
    Join Date
    Mar 2011
    Location
    Riga, Latvia
    Posts
    122

    Default

    Quote Originally Posted by snappy46 View Post
    There is no need to remove the comments the shell interpreter will just ignore them anyway. You need to create a new file called /usr/local/etc/nasmount.sh and copy the whole thing in there. I probably should have attached to whole thing as an attachment that you could have just copied to your /usr/local/etc/ but I guess I was not thinking. The easiest way to do this would be to:

    vi /usr/local/etc/nasmount.sh

    Press "i" in vi to enter insert mode; use your mouse to highlight the content to be copied; move to your terminal screen (Probably putty in your case) and copy the content. Still using vi make the required changes (IP change, mount Paths etc..). Now save the file and exit vi; hint= enter ":wq!"

    Note the mount point can be whatever you want on the PBO; in the example below I used /tmp/ramfs/volumes/public but I could have used anything I want really. If you want your shares to be visible under the HDD tab menu though you will have to use a directory under the /tmp/ramfs/volumes/"whatever_you_want_to_call_it"

    Now that the nasmount.sh has been created you can modify your /usr/local/etc/rcS file and add the /usr/local/etc/nasmount.sh at the end of it.

    This should do it for you; I hope it is a little more clear.

    Good luck.
    Thanks for prompt reply
    Now it's more clear for me excepting of one thing - how to create a new file called /usr/local/etc/nasmount.sh
    If I've got right I just need to do vi /usr/local/etc/nasmount.sh ?
    Since I bought my 1st PBO (it was on March) I'm trying to get more experience in Linux, and I thought that some basic steps have been already passed, but it looks wrong. I promise to improve my knowledge in the future
    thanks in advance for your patience

  5. #135
    Join Date
    Dec 2009
    Location
    Canada (ON)
    Posts
    2,040

    Default

    Quote Originally Posted by jurijz View Post
    Now it's more clear for me excepting of one thing - how to create a new file called /usr/local/etc/nasmount.sh
    If I've got right I just need to do vi /usr/local/etc/nasmount.sh ?
    Yup! exactly like that; or you could create the file and the changes on your PC (Do not use notepad however; I recommend notepad+) and copy that file to your PBO in the /usr/local/etc/ directory. I prefer using vi because the more confortable you get with it the easier things become to modify even though this editor it is far from being intuitive. As far as vi goes google is your friend.

    Do not forget to make that file no matter how your create it with vi or PC editor as executable.

    chmod +x /usr/local/etc/nasmount.sh

    Cheers !!
    Last edited by snappy46; 06-22-2011 at 03:48 PM.

  6. #136
    Join Date
    Mar 2011
    Location
    Riga, Latvia
    Posts
    122

    Default

    Something goes wrong for me
    I've got no movies after run update

    / # /usr/local/etc/srjg/jukebox_update.sh -i -p /tmp/ramfs/volumes/PUBLIC/Movies
    Searching for movies..
    Sorting movies..
    Found movies
    Generating RSS header..

    Done!
    / #

    the new directory has been created under main menu of PBO - I can see PUBLIC folder(and then Movies subfolder) under HDD, but it's empty
    Last edited by jurijz; 06-22-2011 at 08:21 PM.

  7. #137
    Join Date
    Mar 2011
    Location
    Riga, Latvia
    Posts
    122

    Default

    here you can see below my /usr/local/etc/nasmount.sh file

    #!/bin/sh

    # Set timeout to the number of times you want the loop to repeat
    TIMEOUT=20

    # Create the mount point directory
    mkdir -p /tmp/ramfs/volumes/PUBLIC/Movies # Change this to your PBO mount point

    # While we haven't used up all the attempts
    while [ $TIMEOUT -gt 0 ]; do
    # this will be true if 'ping' gets a response
    if ping 192.168.0.106; then # Change this to your NAS IP address
    mount -t cifs //192.168.0.106/PUBLIC/Movies -o username=Guest /tmp/ramfs /volumes/PUBLIC/Movies
    echo "NFS mounted"
    TIMEOUT=0
    # and if there's no response...
    else
    TIMEOUT=$((TIMEOUT - 1))
    if [ $TIMEOUT -eq 0 ]; then
    echo "NFS Failed to mount - no response to server pings"
    fi
    fi
    done
    / #


    and then I put the following lines into /usr/local/etc/rcS

    #nasmount script:
    /usr/local/etc/nasmount.sh &

    I had issued the command : chmod +x /usr/local/etc/nasmount.sh
    nothing happend after, cursor just jump to the next line without any errors of comments
    Last edited by jurijz; 06-22-2011 at 09:20 PM.

  8. #138
    Join Date
    Dec 2009
    Location
    Canada (ON)
    Posts
    2,040

    Default

    Quote Originally Posted by jurijz View Post
    here you can see below my /usr/local/etc/nasmount.sh file

    #!/bin/sh

    # Set timeout to the number of times you want the loop to repeat
    TIMEOUT=20

    # Create the mount point directory
    mkdir -p /tmp/ramfs/volumes/PUBLIC/Movies # Change this to your PBO mount point

    # While we haven't used up all the attempts
    while [ $TIMEOUT -gt 0 ]; do
    # this will be true if 'ping' gets a response
    if ping 192.168.0.106; then # Change this to your NAS IP address
    mount -t cifs //192.168.0.106/PUBLIC/Movies -o username=Guest /tmp/ramfs /volumes/PUBLIC/Movies
    echo "NFS mounted"
    TIMEOUT=0
    # and if there's no response...
    else
    TIMEOUT=$((TIMEOUT - 1))
    if [ $TIMEOUT -eq 0 ]; then
    echo "NFS Failed to mount - no response to server pings"
    fi
    fi
    done
    / #
    Script looks good except for the /# at the end it should not be there but it does not really matter if it is the shell interpreter will just ignore it.

    Quote Originally Posted by jurijz View Post
    and then I put the following lines into /usr/local/etc/rcS

    #nasmount script:
    /usr/local/etc/nasmount.sh &
    This looks good also but you can remove the "&" at the end if you have issues some scripts do not like to be run in a separate session which is what the "&" does.

    Quote Originally Posted by jurijz View Post
    I had issued the command : chmod +x /usr/local/etc/nasmount.sh
    nothing happend after, cursor just jump to the next line without any errors of comments
    That is normal behaviour trust me it executed properly or else you would definitely receive an error message.

    OK first thing first I think that you are almost there; here's a few thing to doublecheck:

    1) Are you sure about the name of your share on your NAS; you can only share whatever your NAS allow you to share. For example I also have a samba public share directory on my NAS but because I put a subdirectory under that share does not mean that I can mount it as a samba share. Given the following example:

    NAS/public = define NAS samba share
    NAS/public/movies = Subdirectory under public

    mount -t cifs //192.168.0.106/public -o username=Guest /tmp/ramfs /volumes/PUBLIC/Movies .....will work fine.

    mount -t cifs //192.168.0.106/public/Movies -o username=Guest /tmp/ramfs /volumes/PUBLIC/Movies .......will not work. I can only mount the samba share directory not any directory under it. So unless you specifically created a /NAS/PUBLIC/Movies samba shared directory on your NAS (This does not just mean creating the directory but actually creating a share on the NAS) the /NAS/PUBLIC/Movies can not be mounted.

    Ok enough about that; now to make sure that the mount command actually works run the mount command manually and see if you receive any error messages. So enter:
    Code:
    mkdir -p /tmp/ramfs/volumes/PUBLIC/Movies
    To make sure that the mount directory exist and then
    Code:
      mount -t cifs //192.168.0.106/PUBLIC/Movies -o username=Guest /tmp/ramfs /volumes/PUBLIC/Movies
    Report any errors that you get. If that all work fine then just try to remove the "&" at the end of the /usr/local/etc/nasmount.sh in the rcS file and see if it helps.

    By the way who is the user that own the /PUBLIC/Movies are you sure that it is guest???? If you have yourself created that share who is the owner???? if not guest make sure that you replace "guest" with the user name define on the NAS. Do you need a password???? if so it need to be included in the mount command after the username ....... password=xxxxxxxxx. Also try guest vs Guest; use the same user / password that you use on your PC to mount that same share under window.

    You are almost there keep trying.

    Cheers !!!
    Last edited by snappy46; 06-23-2011 at 03:58 AM.

  9. #139
    Join Date
    Mar 2011
    Location
    Riga, Latvia
    Posts
    122

    Default

    I almost finished, but...
    I had changed directory from PUBLIC to user's, because both my Windows 7 machine and NAS Gearbox sometimes recognise public folder as "public" instead of PUBLIC. I don't know why. That's why I moved my movies to "user" folder with password
    Now I can mount it manually and everything works fine :
    mkdir -p /tmp/ramfs/volumes/jurijz
    mount -t cifs //192.168.0.106/jurijz -o username=jurijz,password=081 /tmp/ramfs/volumes/jurijz

    I had tried your script and also tried to put above mentioned 2 lines(with sleep 5) at the end of /usr/local/etc/rcS - with no result, shared directory wasn't mounted

    Do you have any ideas why it does'n work automatically, but only manually ?

  10. #140
    Join Date
    Dec 2009
    Location
    Canada (ON)
    Posts
    2,040

    Default

    Quote Originally Posted by jurijz View Post
    I almost finished, but...
    I had changed directory from PUBLIC to user's, because both my Windows 7 machine and NAS Gearbox sometimes recognise public folder as "public" instead of PUBLIC. I don't know why. That's why I moved my movies to "user" folder with password
    Now I can mount it manually and everything works fine :
    mkdir -p /tmp/ramfs/volumes/jurijz
    mount -t cifs //192.168.0.106/jurijz -o username=jurijz,password=081 /tmp/ramfs/volumes/jurijz

    I had tried your script and also tried to put above mentioned 2 lines(with sleep 5) at the end of /usr/local/etc/rcS - with no result, shared directory wasn't mounted

    Do you have any ideas why it does'n work automatically, but only manually ?
    Not sure from your statement if you try to run the actual script manually or just entered the command manually. If you have not try it yet try to run the script manually and see if any errors are showing up.

    /usr/local/etc/nasmount.sh

    or

    sh /usr/local/etc/nasmount.sh

    Let me know if this works without errors; also what firmware are you running currently.

    Also remove the ampersand "&" at the end of the command in the rcS if you have not done so yet and see if it helps.

    Snappy46
    Last edited by snappy46; 06-23-2011 at 01:42 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •