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

Re: [nslu2-general] Detecting Optware

Expand Messages
  • Ron Guerin
    ... /opt is on everything[*]. That would only be useful as a test to see if you were running on a Unix, Linux or BSD system of some sort. That could be
    Message 1 of 12 , Oct 27, 2012
    • 0 Attachment
      On 10/27/2012 12:37 AM, Anthony Takata wrote:
      > Going out on a limb, but looking for the /opt directory is typically a good
      > way, or doing a "which ipkg" and see if it exists.

      /opt is on everything[*]. That would only be useful as a test to see if
      you were running on a Unix, Linux or BSD system of some sort. That
      could be anything from a mainframe to a clip-on music player though.

      The test for /opt/bin/ipkg-opt seems like it's a better choice, but the
      more I've been thinking about it, it really isn't a very good test for
      Optware either, as while ipkg is used by Optware, it's not actually part
      of Optware. In fact, ipkg has been abandoned by its authors, so it's
      highly probable that Optware will switch to something else (likely opkg)
      in the foreseeable future, provided Optware doesn't become abandoned itself.

      It may however that looking for /opt/bin/ipkg-opt is as good an
      indicator as I'm going to get. In the end I'm really trying to figure
      out if I'm on an embedded device where /etc is part of a read-only file
      system and that because of this, I should prefer /opt/etc over /etc for
      locating my config file. I haven't found any remotely sane way of doing
      that, and since my scripts require things that a non-developer user on
      an Optware-capable device would only have gotten from Optware, I thought
      I'd try to find a reliable way of detecting Optware instead. It seems
      there's no way to do that either though.

      - Ron

      [*] http://en.wikipedia.org/wiki/Unix_directory_structure
      http://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard
    • Anthony Takata
      Oh! If all you re doing is testing for writeability, just see if you can touch said file. If it exists afterward, use it, otherwise use /opt :) ... [Non-text
      Message 2 of 12 , Oct 28, 2012
      • 0 Attachment
        Oh! If all you're doing is testing for writeability, just see if you can
        "touch" said file. If it exists afterward, use it, otherwise use /opt :)
        On Oct 28, 2012 8:29 AM, "Ron Guerin" <ron@...> wrote:

        > **
        >
        >
        > On 10/27/2012 12:37 AM, Anthony Takata wrote:
        > > Going out on a limb, but looking for the /opt directory is typically a
        > good
        > > way, or doing a "which ipkg" and see if it exists.
        >
        > /opt is on everything[*]. That would only be useful as a test to see if
        > you were running on a Unix, Linux or BSD system of some sort. That
        > could be anything from a mainframe to a clip-on music player though.
        >
        > The test for /opt/bin/ipkg-opt seems like it's a better choice, but the
        > more I've been thinking about it, it really isn't a very good test for
        > Optware either, as while ipkg is used by Optware, it's not actually part
        > of Optware. In fact, ipkg has been abandoned by its authors, so it's
        > highly probable that Optware will switch to something else (likely opkg)
        > in the foreseeable future, provided Optware doesn't become abandoned
        > itself.
        >
        > It may however that looking for /opt/bin/ipkg-opt is as good an
        > indicator as I'm going to get. In the end I'm really trying to figure
        > out if I'm on an embedded device where /etc is part of a read-only file
        > system and that because of this, I should prefer /opt/etc over /etc for
        > locating my config file. I haven't found any remotely sane way of doing
        > that, and since my scripts require things that a non-developer user on
        > an Optware-capable device would only have gotten from Optware, I thought
        > I'd try to find a reliable way of detecting Optware instead. It seems
        > there's no way to do that either though.
        >
        > - Ron
        >
        > [*] http://en.wikipedia.org/wiki/Unix_directory_structure
        > http://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard
        >
        >


        [Non-text portions of this message have been removed]
      • oddballhero
        You need to ask Brian Zhou or some of the other powers that be what ipkg and Optware s future will be. Optware seems to have spread, and people are still
        Message 3 of 12 , Oct 28, 2012
        • 0 Attachment
          You need to ask Brian Zhou or some of the other powers that be what ipkg and Optware's future will be. Optware seems to have spread, and people are still trying to graft it onto different platforms. Assuming Optware will switch to opkg (like SlugOS or OpenWrt), or Optware being discontinued in the near future, might be wishful thinking on your part. If your proposed Optware related script can't be updated for any significant changes in Optware, then, after release, it be considered as abandoned as what you claim ipkg to be.

          --- In nslu2-general@yahoogroups.com, Ron Guerin <ron@...> wrote:
          >
          > On 10/27/2012 12:37 AM, Anthony Takata wrote:
          > > Going out on a limb, but looking for the /opt directory is typically a good
          > > way, or doing a "which ipkg" and see if it exists.
          >
          > /opt is on everything[*]. That would only be useful as a test to see if
          > you were running on a Unix, Linux or BSD system of some sort. That
          > could be anything from a mainframe to a clip-on music player though.
          >
          > The test for /opt/bin/ipkg-opt seems like it's a better choice, but the
          > more I've been thinking about it, it really isn't a very good test for
          > Optware either, as while ipkg is used by Optware, it's not actually part
          > of Optware. In fact, ipkg has been abandoned by its authors, so it's
          > highly probable that Optware will switch to something else (likely opkg)
          > in the foreseeable future, provided Optware doesn't become abandoned itself.
          >
          > It may however that looking for /opt/bin/ipkg-opt is as good an
          > indicator as I'm going to get. In the end I'm really trying to figure
          > out if I'm on an embedded device where /etc is part of a read-only file
          > system and that because of this, I should prefer /opt/etc over /etc for
          > locating my config file. I haven't found any remotely sane way of doing
          > that, and since my scripts require things that a non-developer user on
          > an Optware-capable device would only have gotten from Optware, I thought
          > I'd try to find a reliable way of detecting Optware instead. It seems
          > there's no way to do that either though.
          >
          > - Ron
          >
          > [*] http://en.wikipedia.org/wiki/Unix_directory_structure
          > http://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard
          >
        • Narendra
          Message 4 of 12 , Nov 4, 2012
          • 0 Attachment
            --- In nslu2-general@yahoogroups.com, Anthony Takata <htwiz2002@...> wrote:
            >
            > Oh! If all you're doing is testing for writeability, just see if you can
            > "touch" said file. If it exists afterward, use it, otherwise use /opt :)
            > On Oct 28, 2012 8:29 AM, "Ron Guerin" <ron@...> wrote:
            >
            > > **
            > >
            > >
            > > On 10/27/2012 12:37 AM, Anthony Takata wrote:
            > > > Going out on a limb, but looking for the /opt directory is typically a
            > > good
            > > > way, or doing a "which ipkg" and see if it exists.
            > >
            > > /opt is on everything[*]. That would only be useful as a test to see if
            > > you were running on a Unix, Linux or BSD system of some sort. That
            > > could be anything from a mainframe to a clip-on music player though.
            > >
            > > The test for /opt/bin/ipkg-opt seems like it's a better choice, but the
            > > more I've been thinking about it, it really isn't a very good test for
            > > Optware either, as while ipkg is used by Optware, it's not actually part
            > > of Optware. In fact, ipkg has been abandoned by its authors, so it's
            > > highly probable that Optware will switch to something else (likely opkg)
            > > in the foreseeable future, provided Optware doesn't become abandoned
            > > itself.
            > >
            > > It may however that looking for /opt/bin/ipkg-opt is as good an
            > > indicator as I'm going to get. In the end I'm really trying to figure
            > > out if I'm on an embedded device where /etc is part of a read-only file
            > > system and that because of this, I should prefer /opt/etc over /etc for
            > > locating my config file. I haven't found any remotely sane way of doing
            > > that, and since my scripts require things that a non-developer user on
            > > an Optware-capable device would only have gotten from Optware, I thought
            > > I'd try to find a reliable way of detecting Optware instead. It seems
            > > there's no way to do that either though.
            > >
            > > - Ron
            > >
            > > [*] http://en.wikipedia.org/wiki/Unix_directory_structure
            > > http://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard
            > >
            > >
            >
            >
            > [Non-text portions of this message have been removed]
            >
          • Narendra
            Message 5 of 12 , Nov 4, 2012
            • 0 Attachment
              --- In nslu2-general@yahoogroups.com, Ron Guerin <ron@...> wrote:
              >
              > On 10/27/2012 06:17 AM, oddballhero wrote:
              > > On 10/26/2012 09:10 AM, Ron Guerin wrote:
              > >> I'm writing some scripts I plan to release and it would be helpful to
              > >> know when I'm running on a device with Optware as opposed to a
              > >> conventional server or desktop. Is there any reliable way to detect
              > >> when you're running on an Optware-enabled device?
              >
              > > Well, they're usually smaller......
              >
              > What is? The physical size of the unit? ;)
              >
              > > They have a bunch of stuff under /opt .......
              >
              > So do lots of systems that aren't running Optware.
              >
              > > You can type ipkg and it will like it .............
              >
              > I was thinking of testing for the existence of /opt/bin/ipkg-opt,
              > because it seems unlikely that you'd find something called ipkg-opt in
              > /opt/bin anywhere except on an Optware system. I was hoping there'd be
              > something else though, partly because it seems that ipkg is apparently
              > abandoned software. It wouldn't surprise me if at some point in the not
              > distant future, ipkg got replaced with opkg or something else.
              >
              > - Ron
              >
            • Narendra
              Message 6 of 12 , Nov 4, 2012
              • 0 Attachment
                --- In nslu2-general@yahoogroups.com, Ron Guerin <ron@...> wrote:
                >
                > On 10/27/2012 12:37 AM, Anthony Takata wrote:
                > > Going out on a limb, but looking for the /opt directory is typically a good
                > > way, or doing a "which ipkg" and see if it exists.
                >
                > /opt is on everything[*]. That would only be useful as a test to see if
                > you were running on a Unix, Linux or BSD system of some sort. That
                > could be anything from a mainframe to a clip-on music player though.
                >
                > The test for /opt/bin/ipkg-opt seems like it's a better choice, but the
                > more I've been thinking about it, it really isn't a very good test for
                > Optware either, as while ipkg is used by Optware, it's not actually part
                > of Optware. In fact, ipkg has been abandoned by its authors, so it's
                > highly probable that Optware will switch to something else (likely opkg)
                > in the foreseeable future, provided Optware doesn't become abandoned itself.
                >
                > It may however that looking for /opt/bin/ipkg-opt is as good an
                > indicator as I'm going to get. In the end I'm really trying to figure
                > out if I'm on an embedded device where /etc is part of a read-only file
                > system and that because of this, I should prefer /opt/etc over /etc for
                > locating my config file. I haven't found any remotely sane way of doing
                > that, and since my scripts require things that a non-developer user on
                > an Optware-capable device would only have gotten from Optware, I thought
                > I'd try to find a reliable way of detecting Optware instead. It seems
                > there's no way to do that either though.
                >
                > - Ron
                >
                > [*] http://en.wikipedia.org/wiki/Unix_directory_structure
                > http://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard
                >
              Your message has been successfully submitted and would be delivered to recipients shortly.