Loading ...
Sorry, an error occurred while loading the content.

Re: [nslu2-linux] NSLU2 and twonky mediaserver

Expand Messages
  • Siddy
    Hi! ... I had similar problems with two of my scripts in /opt/etc/init.d. The problems resulted from two totaly different reasons, so here they are: 1) Startup
    Message 1 of 14 , Jan 1, 2005
    • 0 Attachment
      Hi!

      > My problem : when i start up NSLU2 he starts up all my scripts (that
      > are located in /opt/etc/init.d/...).
      > But I've also got TwonkyVision Mediaserver running, and this script
      > doesn't start up automatically.

      I had similar problems with two of my scripts in /opt/etc/init.d. The
      problems resulted from two totaly different reasons, so here they are:

      1) Startup of your mediaserver will fail if it needs access to files
      on /share/hdd/data for startup. The data-partition is unavailable
      during execution of the init-scripts.

      2) Does the mediaserver need external libraries? If it does, they will
      probably be in /opt/lib, which is not included in LD_LIBRARY_PATH
      during execution of the init-scripts. Simply execute the mediaserver
      via LD_LIBRARY_PATH=/opt/lib /path/to/funky/mediaserver and there you
      go!

      Cheers,
      Siddy
    • Rod Whitby
      ... That s not correct (or if it is correct then it s a serious bug). The data partition is mounted in rc.bootbin, well before the /opt/etc/init.d scripts
      Message 2 of 14 , Jan 1, 2005
      • 0 Attachment
        > 1) Startup of your mediaserver will fail if it needs access to files
        > on /share/hdd/data for startup. The data-partition is unavailable
        > during execution of the init-scripts.

        That's not correct (or if it is correct then it's a serious bug). The
        data partition is mounted in rc.bootbin, well before the
        /opt/etc/init.d scripts run.

        > 2) Does the mediaserver need external libraries? If it does, they will
        > probably be in /opt/lib, which is not included in LD_LIBRARY_PATH
        > during execution of the init-scripts. Simply execute the mediaserver
        > via LD_LIBRARY_PATH=/opt/lib /path/to/funky/mediaserver and there you
        > go!

        As a customer, you should alert Twonkyvision to the fact that they can
        encode that library path into the executable at link time to save you
        this trouble. Point them to the Unslung packages Makefile where this
        is now done automatically for all Unslung packages.

        --- Rod
      • Siddy
        Hi! ... Well... I wanted to start a thttpd, which should log to /share/hdd/data/log/thttpd.log. Starting the script manually was no problem at all, automatic
        Message 3 of 14 , Jan 2, 2005
        • 0 Attachment
          Hi!

          On Sun, 2 Jan 2005 08:14:26 +1030, Rod Whitby <list.yahoo@...> wrote:
          >
          > > 1) Startup of your mediaserver will fail if it needs access to files
          > > on /share/hdd/data for startup. The data-partition is unavailable
          > > during execution of the init-scripts.
          >
          > That's not correct (or if it is correct then it's a serious bug). The
          > data partition is mounted in rc.bootbin, well before the
          > /opt/etc/init.d scripts run.

          Well... I wanted to start a thttpd, which should log to
          /share/hdd/data/log/thttpd.log. Starting the script manually was no
          problem at all, automatic startup on boot gave an error "Can't connect
          to /share/hdd/data/log/thttpd.log" (or similar, can't remember...).
          Logging to /share/hdd/conf/log/thttpd.log solved that problem. So, to
          me it looks like the data-partition is unavailable (at least for
          writing) during script-execution.

          Ciao,
          Siddy
        • Siddy
          Rehi! ... Here s the output of mount, executed via an init.d-script: /dev/mtdblock4 on / type jffs2 (rw) /proc on /proc type proc (rw) usbdevfs on
          Message 4 of 14 , Jan 2, 2005
          • 0 Attachment
            Rehi!

            On Sun, 2 Jan 2005 11:59:57 +0100, Siddy <sidddy@...> wrote:
            > Hi!
            >
            > On Sun, 2 Jan 2005 08:14:26 +1030, Rod Whitby <list.yahoo@...> wrote:
            > >
            > > > 1) Startup of your mediaserver will fail if it needs access to files
            > > > on /share/hdd/data for startup. The data-partition is unavailable
            > > > during execution of the init-scripts.
            > >
            > > That's not correct (or if it is correct then it's a serious bug). The
            > > data partition is mounted in rc.bootbin, well before the
            > > /opt/etc/init.d scripts run.
            >
            > Well... I wanted to start a thttpd, which should log to
            > /share/hdd/data/log/thttpd.log. Starting the script manually was no
            > problem at all, automatic startup on boot gave an error "Can't connect
            > to /share/hdd/data/log/thttpd.log" (or similar, can't remember...).
            > Logging to /share/hdd/conf/log/thttpd.log solved that problem. So, to
            > me it looks like the data-partition is unavailable (at least for
            > writing) during script-execution.

            Here's the output of mount, executed via an init.d-script:

            /dev/mtdblock4 on / type jffs2 (rw)
            /proc on /proc type proc (rw)
            usbdevfs on /proc/bus/usb type usbdevfs (rw)
            /dev/mtdblock4 on /dev.state type jffs2 (rw)
            ramfs on /dev type ramfs (rw)
            /dev/mtdblock4 on /var.state type jffs2 (rw)
            ramfs on /var type ramfs (rw)
            /dev/sda1 on /share/hdd/data type ext3 (ro)
            /dev/sda2 on /share/hdd/conf type ext3 (rw,sync)
            none on /tmp type ramfs (rw)

            So, the data-partition is mounted read-only, which _was_ a problem for
            my thttpd.

            Cheers,
            Siddy
          • bastiaanve
            ... I just installed 3.16b + twonkyvision server without any problems. I ll try to go into detail what I did: put mediaserver in /opt/bin, make sure it s
            Message 5 of 14 , Jan 2, 2005
            • 0 Attachment
              --- In nslu2-linux@yahoogroups.com, "funny_foxii" <funny_foxii@y...>
              wrote:
              >
              > Hello Bastiaan,
              >
              > I've tried it, same thing : manually ok, automatically not working
              > at all.
              >
              > Any other suggestions ?
              >
              > -Davy

              I just installed 3.16b + twonkyvision server without any problems.
              I'll try to go into detail what I did:

              put mediaserver in /opt/bin, make sure it's executable
              cd to /opt/bin and run ./mediaserver
              ctrl+c to kill it
              this will have created twonkyvision-mediaserver.ini in the same directory
              edit this file to your preference.
              if you use contentdir option, make sure this path exists
              if you use dbfile option, make sure this path exists

              create the following files in /opt/etc/init.d:
              S99twonky:
              #!/bin/sh
              cd /opt/bin
              /opt/bin/mediaserver -D

              K99twonky:
              #!/bin/sh
              /bin/killall mediaserver

              make them executable:
              chmod +x S99twonky K99twonky

              that's it...
              you can try to run /opt/etc/init.d/S99twonky from the commandline to
              check that the script is working. it should print "TwonkyVision Media
              Server Version 2.4" and return immediately. ps should now show it running.

              Bastiaan

              > --- In nslu2-linux@yahoogroups.com, "bastiaanve" <bastiaanve@y...>
              > wrote:
              > >
              > > --- In nslu2-linux@yahoogroups.com, "funny_foxii"
              > <funny_foxii@y...>
              > > wrote:
              > > >
              > > > Hello Everyone,
              > > >
              > > > I'm now using the NSLU2 for 3 months and just installed unslung
              > 3.16.
              > >
              > > I'm using 2.12b
              > >
              > > >
              > > > Can anybody help me out???
              > >
              > > my script is something like:
              > >
              > > chdir /opt/bin
              > > /opt/bin/mediaserver -D
              > >
              > > This starts just fine at boot and keeps the server running.
              > > -D starts it in daemon mode. This is documented at
              > > http://www.twonkyvision.de/UPnP/MediaServerUsage.html
              > >
              > > Bastiaan
              > >
              > > >
              > > >
              > > > Thanks,
              > > > Davy
            • Rod Whitby
              ... Are you sure it s not the quota checking which is causing your data drive to be read-only at that time? Try diverting rc.quota to a null script which
              Message 6 of 14 , Jan 2, 2005
              • 0 Attachment
                On Sun, 2 Jan 2005 12:18:08 +0100, Siddy <sidddy@...> wrote:
                > /dev/sda1 on /share/hdd/data type ext3 (ro)
                > /dev/sda2 on /share/hdd/conf type ext3 (rw,sync)
                > So, the data-partition is mounted read-only, which _was_ a problem for
                > my thttpd.

                Are you sure it's not the quota checking which is causing your data
                drive to be read-only at that time? Try diverting rc.quota to a null
                script which returns 0.

                -- Rod
              Your message has been successfully submitted and would be delivered to recipients shortly.