Re: ver_linux script

From: Tim Coleman (tim@beastor.mine.nu)
Date: Wed Mar 15 2000 - 09:16:31 EST


Hi Riley

The changes you suggested seem to make sense and the output
looks very nice on the machine at work that I tested it on.
(except for the fact that /proc/modules doesn't exist, so
I get an error from cat).

At home, however, I have a few problems. One of them is
caused by the removal of the 'PATH' line. Although when
I am root /sbin/insmod is in my path, when I'm a user it is
not. This causes output like this:

"Kernel modules found"

because insmod is not found.

The script looks like line noise, but that's to be expected.

I don't know if you care to make it more robust or not, but
I think this thread has gone on for just about long enough :)
By robust, I mean checking to make sure files exist before
cat-ing them, and so on. I don't think that that level of
checking is really necessary though, because the error messages
are just as informative and don't stop the script from running.

I've attached a slightly modified version here, which includes
the PATH statement so that it finds stuff in /sbin, as well
as checking that /proc/modules and /proc/version exist before
doing stuff with them.

I noticed that you didn't include some backslashes, so for
completeness I added them in.

Tim





-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Mar 15 2000 - 21:00:30 EST