Y
Yohan N Leder
I've read the thread; and I didn't see you had solved a Perl problem
anywhere in the thread.
It's your right to have an opinion
I've read the thread; and I didn't see you had solved a Perl problem
anywhere in the thread.
so I'll switch to "End of Thread" mode here.
You surely know the sentence : "Tell me what you need and I'll tell you
how to do without"... Really and independently to the kindly of your
post, I'll don't debate about the pertinence or not of the choice, but
how to achieve this precise choice : I'm not alone here, but just the
one who has to achieve this specific choice these days... So, I'll do it
whatever be the way to succeed...
If one is writing an installer, it might be useful to know if one is
to use yum, apt-get, or yast to install any dependencies,
or which package to prompt the user to install.
If one is writing a test harness, it's often useful to be able to
report to the person reading the test results what distro was
installed on the system under test.
Peter J. Holzer said:So test for the availability of these tools.
A stock redhat system hasn't any of these tools, but the sysadmin
might have installed yum or apt (most of my redhat systems have
apt). it might even be possible to deinstall yast on a suse system.
Yes, but it generally needs quite special knowledge which changes
frequently.
A feature provided by package X in version n might be provided by
package Y in version n+1.
So as a hint for the user that's helpful ("I can't find libfoo,
since you are on a Redhat system, it is probably included in the
foo2-devel package", or something like that), but the same
information could just be contained in the README without any real
loss of functionality.
To adapt the behaviour of the program to its environment, there are
usually more direct and reliable indicators than the distribution.
This doesn't necessarily give you what you need. For instance, RHEL3
may need packages a-1.3.rpm, b-2.4.rpm, and so on, but RHEL4 might
need a-1.9.rpm, and b-3.7.rpm.
Right-- which means that testing for the tools may not tell you want
you want to know, because, depending on the ordering of the check, you
may end up deciding you're on the wrong sort of system.
I disagree; being forced to handle something manually which could be
handled automatically counts as a real loss of functionality in my
book.
A suggestion such as you make is nice if you're trying to make your
installer forward-compatible with distros you don't know about when
the installer is written, but if you can know the answer, why not use
that information?
I would like to distinguish the accurate linux distribution when $^O is
'linux'. How to do ? Do I have to figure-out searching for trace of
distribution name in some environment variables like SERVER_SOFTWARE or
SERVER_SIGNATURE which may contains a reference to the operating system
under which the web server has been built for ? Something better in mind
?
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.