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

8762Re: [nslu2-general] Detecting Optware

Expand Messages
  • Ron Guerin
    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
    • Show all 12 messages in this topic