Re: Determining the UNIX flavour and version from netboot filesets




Michael Vilain wrote:
In article <1164650003.641568.247730@xxxxxxxxxxxxxxxxxxxxxxxxxxx>,
arindam.mukerjee@xxxxxxxxx wrote:

Michael Vilain wrote:
In article <1164641346.339766.267580@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
arindam.mukerjee@xxxxxxxxx wrote:

I am writing code for managing a boot server which might be running
Linux or Solaris. However, it might have several netboot filesets from
which remote machines can network boot into Solaris (sparc or x86) or
aix (5.1, 5.2, 5.3). Given a directory, I need to find out through code
whether this is a Solaris or AIX, which version and meant to run on
which processor. Can you please tell me what are the definitive tests
for this.

I need to cross-post this query on a few other forums (comp.unix.aix
and comp.unix.solaris) as I need a quick answer. Apologies for this.


-- arindam

man uname

Well I guess I did not put across my question correctly. I get system
info through the uname() system call for a running system - which is my
SunOS sparc or Linux server.

But on the server's storage, we have got directories containing entire
minimal installations of other UNIX OS's - these cannot be booted into
on this computer. They are NFS shared, and a remote computer using rarp
/ pxe / tftp etc. can boot into OS-es and use these directories as
their root directories. You would know about this if you are familiar
with network boots. - These are called netboot filesets.

So - given that a SunOS SPARC netboot fileset's directory structure is
pretty similar to a normal SunOS SPARC directory structure - is there a
way I could confirm by examining some files on the disk that this is a
SunOS netboot fileset and not an AIX one. Further, how can I get the
version info.

Well, if I understand your question, you want to be able to distinguish
one directory tree of files vs. another. Do you need to make this
determination when a system has booted from this fileset or just
externally? What's wrong with putting a .readme file in some obvious
place like <fileset>/etc/? ISTR Solaris has /etc/release (or somewhere,
I forget) which contains a string with the actual release of the OS.


Nothing wrong - in fact that is what we will be doing for all new
netboot filesets we create. But - we also have to make our app work
with an awful lot of existing filesets. The previous version of our
application wasn't so smart and depended on a lot of user inputs.

--
DeeDee, don't press that button! DeeDee! NO! Dee...

.