Linux-Misc Digest #648, Volume #25                Sat, 2 Sep 00 16:13:04 EDT

Contents:
  Re: Getting my Soundblaster16 installed in Redhat 6.1 (Jean-David Beyer-valinux)
  Re: Getting my Soundblaster16 installed in Redhat 6.1 ("Peter T. Breuer")
  Re: sony Vios...requesting info ("Peter T. Breuer")
  Re: timestamp problems (Jean-David Beyer-valinux)
  Re: Getting my Soundblaster16 installed in Redhat 6.1 (bullwinkle)
  Re: Netscape Sucks, I need another option. (Tony)
  Re: access database on Linux (Scott Alfter)
  Re: timestamp problems (Tony)
  Re: UID issue (David Rysdam)
  Re: CAUTION: I am under attack from an incompetent hacker probably in  germany 
(Scott Alfter)
  Re: locate - permission denied ("gnologic")
  Re: Netscape is the best web brower for Linux? Where is the alternative? (Scott 
Alfter)
  Updated version of hinv perl script ("Robert L. Klungle")

----------------------------------------------------------------------------

From: Jean-David Beyer-valinux <[EMAIL PROTECTED]>
Subject: Re: Getting my Soundblaster16 installed in Redhat 6.1
Date: Sat, 02 Sep 2000 14:12:41 -0400

mike wrote:

> Hi,
>     I have a Soundblaster 16 or some variation. I had spoken to
> a technical person at Redhat when I first bought the distribution.
>     The problem was that my card was not recognized automatically
> by the system and the technician gave me some lines to type
> in in the conf.modules file and also the file called something
> like isapnp.conf. The sound card worked perfectly after that.
>     The issue now is that I had to reinstall my system because
> of a crash and can't find the info that he gave me on
> installing the card.

It should be in your notebook where you keep a record of these
things, should it not?

>     My card works perfectly in Windows 95 installed as a
> Soundblaster 16.
>     Help will be much appreciated. I usually save all my
> config files on floppys and write down important info,
> but I slipped up on that one.
>
>                                                     Thanks
>
>                                                         Mike

Try man sndconfig. It should explain how to run sndconfig to setup
your sound board. You should get something like this in your
/etc/conf.modules when you are done:

alias sound sb
pre-install sound insmod sound dmabuf=1
alias midi opl3
options opl3 io=0x388
options sb io=0x220 irq=5 dma=1 mpu_io=0x330

You probably do not want to just copy mine, since your system may be
different, but they might work.

--
 .~.   Jean-David Beyer           Registered Linux User 85642.
 /V\                              Registered Machine    73926.
/( )\  Shrewsbury, New Jersey
^^-^^  2:06pm up 24 days, 21:34, 4 users, load average: 2.15, 2.31, 2.28




------------------------------

From: "Peter T. Breuer" <[EMAIL PROTECTED]>
Subject: Re: Getting my Soundblaster16 installed in Redhat 6.1
Date: 2 Sep 2000 18:03:51 GMT

mike <[EMAIL PROTECTED]> wrote:
:                     I have tried pnpdump and read PnP HOWTO and
: Sound HOWTO, and haven't, so far, found a solution. I will

Well, there isn't a solution anywhere else! What you are saying is "I
have read the instructions and I have not found a solution". This is
contradictory.

: continue to try.

:                                                         Mike
: P.S. The config programs don't see or find the correct info

What config programs? Give data, not chinese puzzles.

Look, it's perfectly simple. The sound howto will tell you how to
identify your card. If it really is an ISA SB16 PnP (which I doubt!)
then all you have to do is run pnpdump and take it from there, as
per the instructions in the howtos you mentioned.

At which point in the sequence do you find that the results do not
accord with what is expected? Are you not able to get any 
output from pnpdump? Are you not able to create a file using that
output? Are you not able to edit the file? Are you not
able to run isapnp over it? Are you not able to edit conf.modules
to reflect the parameters you entered and set with isapnp?
Did you forget to set the bios to allow pnp interrogation? 

Which? Make with the data. Show us the output from pnpdump, for
example. Then show us how you edited the file. Then show us any error
messages from running isapnp over it. Show us how you edited
conf.modules. Etc. etc. etc.

Peter


------------------------------

From: "Peter T. Breuer" <[EMAIL PROTECTED]>
Subject: Re: sony Vios...requesting info
Date: 2 Sep 2000 18:07:39 GMT

prasanth Mudundi <[EMAIL PROTECTED]> wrote:
: planning on buying a sony PCG-F590K VAIO NOTEBOOK 
: can i install linux and has anybody done it.

Plenty of people have linux on sony vaios. Don't know about your model.
Linus himself has a 505, as I recall.

: I prefer SUSE. But if i have to i am willing to 

The distro is irrelevant. Linus complained that he couldn't use both
the cdrom and the floppy at the same time, making it difficult to boot
from floppy in order to get the distro off the CD. I think both are on
pcmcia crads.  The solutions range from the obvious to the ingenious (I
think Linus' fell in the latter category, involving the use of the
floppy format of the first tracks on a bootable cdrom).

If yours is a firewire model, that doesn't work. Or didn't, last time I
looked.

Peter

------------------------------

From: Jean-David Beyer-valinux <[EMAIL PROTECTED]>
Subject: Re: timestamp problems
Date: Sat, 02 Sep 2000 14:22:02 -0400

Tony wrote:

> Running Linux Redhat 6.2 Kernel 2.2.16-3, P-III 700MHZ 256MB RAM:
>
> When I create a file (pico for example) or when I run "touch filename"
> the timestamp of the file is exactly 7 hours in advance (GMT). However
> all other system clocks seem to be correct. When I run "date" the date
> and time returned is correct. I have run timetool, linuxconf, checked
> the CMOS's date/time and all those are correct.
>
> This problem occurs if I FTP a file to the computer or any manipulation
> of a file where a timestamp would be initiated. Because of this
> timestamp problem, many programs won't work correctly. For example:
>
> When Linux RedHat starts up it runs "/etc/rc.d/inet.d/syslogd". This
> startup script uses "touch" to create a file at:
>
> /var/lock/subsys/syslog
>
> But because the timestamp of this touch is different than the time of
> the machine, this startup says it failed. However syslogd is running and
> all log message timestamps show the "correct" date/time. Other problems
> are also caused by this. For example:
>
> If I edit a file with my programmer's editor it always says that the
> time of the file I am trying to save is newer on the computer than the
> time I am now trying to save and asks if I want to overwrite. These are
> just some of the annoying problems this has caused.
>
> I have not done any updating of my system (kernel etc) for over a month.
> Everything worked just fine and then one day it didn't.
>
> Any ideas?
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.

It may be that one of the programs is putting out UTC time. My machine runs
the hardware clock in UTC. I sometimes have problems with my other system
that is dual boot Microsoft Windows 95 and Linux. I have to run the clock
there in local time because Microsoft is too dumb to do anything else.
Trouble is, Windows diddles the clock whenever Daylight Savings TIme begins
and ends, and once in a while it thinks that is at a different time from
reality. When it adjusts to Daylight Savings Time in January or something,
things get really screwy. This machine is Linux-Only, and I have no
problems running the hardware clock in UTC.

Here are a few experiments:

valinux:jdbeyer[~]$ date
Sat Sep  2 14:13:48 EDT 2000
valinux:jdbeyer[~]$ touch frammis
valinux:jdbeyer[~]$ ls -l frammis
-rw-r-----   1 jdbeyer  jdbeyer         0 Sep  2 14:13 frammis
valinux:jdbeyer[~]$ /sbin/clock
Sat Sep  2 18:15:30 2000  -0.601410 seconds
valinux:jdbeyer[~]$

(I see my hardware clock is drifting. My system clock is set to the
U.S.Navy clock up to 4 times a day, and is rarely more than a few seconds
off.)


--
 .~.   Jean-David Beyer           Registered Linux User 85642.
 /V\                              Registered Machine    73926.
/( )\  Shrewsbury, New Jersey
^^-^^  2:12pm up 24 days, 21:41, 5 users, load average: 2.31, 2.34, 2.28




------------------------------

From: bullwinkle <[EMAIL PROTECTED]>
Subject: Re: Getting my Soundblaster16 installed in Redhat 6.1
Date: Sat, 02 Sep 2000 18:29:01 GMT


mike wrote:
> 
> Hi Peter, and All,
>                     I have tried pnpdump and read PnP HOWTO and
> Sound HOWTO, and haven't, so far, found a solution. I will
> continue to try.
>                                                  Thanks
> 
>                                                         Mike
> P.S. The config programs don't see or find the correct info
> 

Try entering the command "sndconfig" from a text terminal (don't use 
an X window for this).  You should be able to configure and test the 
sound card.  If there are no conflicts, just choose the defaults, and
you should be ok.  Sndconfig will not check for conflicts though. 
After adding a second ethernet card, I had to determine my Soundblaster 16
and the new ethernet card would not share an interrupt. This has worked 
for me with a Soundblaster 16 (ISA) and redhat 6.1 and 6.2.
          I/O port=0x220
          IRQ=7
          DMA1=0
          DMA2=5
          MPU I/O=0x330       


--
Posted via CNET Help.com
http://www.help.com/

------------------------------

From: Tony <[EMAIL PROTECTED]>
Subject: Re: Netscape Sucks, I need another option.
Date: Sat, 02 Sep 2000 18:25:44 GMT

In article <8ohd1r$3qa$[EMAIL PROTECTED]>,
  "Gabe" <[EMAIL PROTECTED]> wrote:
> Hi.
>
> I'm a new Linux user. The best thing about Windows is Internet
Explorer,
> because frankly, Netscape sucks. It's slow, buggy, and doesn't display
pages
> correctly.
>
> I need another option besides Lynx. Is there another browser I can use
in X
> that comes highly recommended?
>
> Gabe
>

Netscape works fine for me 4.74 Linux Redhat.

When you say Netscape doesn't display pages correctly it's probably
because those pages were created with something by MS like FrontPage.
These HTML editors by MS suck and write terrible code. They often forget
to close specific and required HTML Tags like <TABLE>s which make them
impossible to view via Netscape. While it may parse OK with IE, it's not
correct code. Netscape relies on correct code.

I also have no problem with correctly programmed Javascript. After all,
Netscape and Sun were the ones behind Javascript. Just because MS does
it "there way" doesn't mean it's the "right way". If the person
programming these Javascripts were worried about writing platform
independent code, you would't have these problems.

The main reason I switched to Linux is because I was sick and tired of
the Windoz OS crashing and I'm sure you have your reasons as well which
are along these same lines. If MS developed a stable OS they may even
develop a good Web page editor, but as you know, there's nothing stable
about any MS product (have you tried Win/2000? YUK!). Also Web site
programmers and editing softwares need to write platform independent
code and stick to standards. It can be done, but because 95% of the
computer OS market belongs to MS, I guess these programmers simply don't
do the work that is necessary.


Sent via Deja.com http://www.deja.com/
Before you buy.

------------------------------

From: [EMAIL PROTECTED] (Scott Alfter)
Subject: Re: access database on Linux
Date: Sat, 02 Sep 2000 19:06:37 GMT

=====BEGIN PGP SIGNED MESSAGE=====
Hash: SHA1

In article <[EMAIL PROTECTED]>,
Jean-David Beyer-valinux  <[EMAIL PROTECTED]> wrote:
>I would doubt Microsoft Access will run on Linux. If it does, it would run
>on WINE, but I sort-of doubt it. I have not checked.

I can't speak for Wine, but Access 2000 runs fine under Win98 under VMware. 
That's the easiest way to go, though it won't be the cheapest (especially if
you don't already have Win98) and those who are religious about keeping MS
stuff off of their computers will find this solution unacceptable. 
(Personally, I think Win98 runs better under VMware than it does on the
metal...it's probably a result of getting it to work right with the same set
of drivers on every machine, so you remove the instabilities that can be
brought about by substandard device drivers.  It's a little bit slower, but
the same speed-vs.-stability argument could be made for NT 3.51 vs. NT 4.)

  _/_
 / v \
(IIGS(  Scott Alfter (remove Voyager's hull number for email address)
 \_^_/  http://salfter.dyndns.org
=====BEGIN PGP SIGNATURE=====
Version: GnuPG v1.0.2 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE5sVD/VgTKos01OwkRAhikAKDhbyoERhfmompzDgOKDkGP4/vQEwCfZiTJ
tirtTeFt+BeRs2Eo/H+k008=
=t39U
=====END PGP SIGNATURE=====

------------------------------

From: Tony <[EMAIL PROTECTED]>
Subject: Re: timestamp problems
Date: Sat, 02 Sep 2000 19:13:56 GMT

In article <[EMAIL PROTECTED]>,
  Jean-David Beyer-valinux <[EMAIL PROTECTED]> wrote:
> Tony wrote:
>
> > Running Linux Redhat 6.2 Kernel 2.2.16-3, P-III 700MHZ 256MB RAM:
> >
> > When I create a file (pico for example) or when I run "touch
filename"
> > the timestamp of the file is exactly 7 hours in advance (GMT).
However
> > all other system clocks seem to be correct. When I run "date" the
date
> > and time returned is correct. I have run timetool, linuxconf,
checked
> > the CMOS's date/time and all those are correct.
> >
> > This problem occurs if I FTP a file to the computer or any
manipulation
> > of a file where a timestamp would be initiated. Because of this
> > timestamp problem, many programs won't work correctly. For example:
> >
> > When Linux RedHat starts up it runs "/etc/rc.d/inet.d/syslogd". This
> > startup script uses "touch" to create a file at:
> >
> > /var/lock/subsys/syslog
> >
> > But because the timestamp of this touch is different than the time
of
> > the machine, this startup says it failed. However syslogd is running
and
> > all log message timestamps show the "correct" date/time. Other
problems
> > are also caused by this. For example:
> >
> > If I edit a file with my programmer's editor it always says that the
> > time of the file I am trying to save is newer on the computer than
the
> > time I am now trying to save and asks if I want to overwrite. These
are
> > just some of the annoying problems this has caused.
> >
> > I have not done any updating of my system (kernel etc) for over a
month.
> > Everything worked just fine and then one day it didn't.
> >
> > Any ideas?
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
>
> It may be that one of the programs is putting out UTC time. My machine
runs
> the hardware clock in UTC. I sometimes have problems with my other
system
> that is dual boot Microsoft Windows 95 and Linux. I have to run the
clock
> there in local time because Microsoft is too dumb to do anything else.
> Trouble is, Windows diddles the clock whenever Daylight Savings TIme
begins
> and ends, and once in a while it thinks that is at a different time
from
> reality. When it adjusts to Daylight Savings Time in January or
something,
> things get really screwy. This machine is Linux-Only, and I have no
> problems running the hardware clock in UTC.
>
> Here are a few experiments:
>
> valinux:jdbeyer[~]$ date
> Sat Sep  2 14:13:48 EDT 2000
> valinux:jdbeyer[~]$ touch frammis
> valinux:jdbeyer[~]$ ls -l frammis
> -rw-r-----   1 jdbeyer  jdbeyer         0 Sep  2 14:13 frammis
> valinux:jdbeyer[~]$ /sbin/clock
> Sat Sep  2 18:15:30 2000  -0.601410 seconds
> valinux:jdbeyer[~]$
>
> (I see my hardware clock is drifting. My system clock is set to the
> U.S.Navy clock up to 4 times a day, and is rarely more than a few
seconds
> off.)
>
> --
>  .~.   Jean-David Beyer           Registered Linux User 85642.
>  /V\                              Registered Machine    73926.
> /( )\  Shrewsbury, New Jersey
> ^^-^^  2:12pm up 24 days, 21:41, 5 users, load average: 2.31, 2.34,
2.28
>
>

I can't see anything wrong with the clock:

[[EMAIL PROTECTED]]$ date
Sat Sep  2 11:58:39 MST 2000
[[EMAIL PROTECTED]]$ touch frammis
[[EMAIL PROTECTED]]$ ls -l frammis
-rw-rw-r--   1 tonyf  tonyf         0 Sep  2 18:58 frammis
[[EMAIL PROTECTED]]$ /sbin/clock
Sat Sep  2 11:59:01 2000  -0.823669 seconds
[[EMAIL PROTECTED]]$

You'll notice that touch created a file 7 hours in advance. This I
believe is GMT, but I don't see how it can create a file with this
timestamp if all other times are not GMT? The CMOS is also set to the
correct time.

Isn't this a strange one? There must be something that determines the
date of a newly created or modified file. Obviously this has nothing to
do with the clock (at least these clocks).

I looked at my /etc/adjtime file:

-0.013481 967840065 0.000000
967840065
LOCAL

On my other Linux box it reads:

0.0 0 0.0

So could this be something?

Thanks for trying to help.


Sent via Deja.com http://www.deja.com/
Before you buy.

------------------------------

From: [EMAIL PROTECTED] (David Rysdam)
Subject: Re: UID issue
Date: 2 Sep 2000 18:28:24 GMT
Reply-To: [EMAIL PROTECTED]

=====BEGIN PGP SIGNED MESSAGE=====
Hash: SHA1

If you are seeing the UIDs on the client, they are probably defined in
the server's /etc/passwd.  If you are seeing them on the server, they
are probably defined in the client's /etc/passwd.  Check out NIS to
fix this.

And [EMAIL PROTECTED] Spoke:
>   I have recently been working with NFS and Samba and had an
>interesting thing happen on the server. I am not sure if this is the
>cause or not, but it happened at about this time. The system no longer
>recognizes the user accounts by there names. For instance, the shell is
>set up to have the username in the prompt. Well, now instead of the
>username, it says "I have no name!" Also, long directory listings only
>give the UID in the owner field, not the username. How do I fix this?
>
>    Will
>
>
>


- -- 
My public encryption key is available from www.keyserver.net
=====BEGIN PGP SIGNATURE=====
Version: GnuPG v1.0.0 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE5sUb+8mkEvJSZJO8RAlZ7AJ9jiGm5pAf1vOyLT313G+Jvm0vD4ACfWL1R
FerjQUaFi/ho8qtIgYVK5Zs=
=QTO9
=====END PGP SIGNATURE=====

------------------------------

From: [EMAIL PROTECTED] (Scott Alfter)
Crossposted-To: comp.os.linux,comp.os.linux.admin
Subject: Re: CAUTION: I am under attack from an incompetent hacker probably in  germany
Date: Sat, 02 Sep 2000 19:11:55 GMT

=====BEGIN PGP SIGNED MESSAGE=====
Hash: SHA1

In article <[EMAIL PROTECTED]>,
Black Dragon <[EMAIL PROTECTED]> wrote:
>On Wed, 30 Aug 2000 15:18:46 GMT in comp.os.linux,
><[EMAIL PROTECTED]> `Person 7' said:
>>On Mon, 5 Jun 2000 07:36:00 -0230, in comp.os.linux.admin,
>> ("FellowTraveller" <[EMAIL PROTECTED]>) wrote:
>>>am using one of the NT PC's here to post this, as I find Outlook Express
>>>best for news reading...  and I do find that Netscape has not been as good
>>
>>Outlook express is crap at newsreading.
>>You want free-agent
>
>Pah ! Lookout Express, Nutscrape Messenger, and Forte Agent are all *SLRN*
>'wannabes.  :-)

trn is God's Own Newsreader (TM). :-)

  _/_
 / v \
(IIGS(  Scott Alfter (remove Voyager's hull number for email address)
 \_^_/  http://salfter.dyndns.org
=====BEGIN PGP SIGNATURE=====
Version: GnuPG v1.0.2 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE5sVIhVgTKos01OwkRAmEpAKDKdA3D2VYQw0YkgC1JL/Y8K+kWyACg09K4
+M2Ave0QwDsLnuk1cxaZUyQ=
=KEcU
=====END PGP SIGNATURE=====

------------------------------

From: "gnologic" <[EMAIL PROTECTED]>
Subject: Re: locate - permission denied
Date: Sat, 02 Sep 2000 19:18:20 GMT

It would have been easy to recommend a HowTo or even easier to skip the
post completely. Nope, your ego wouldn't let that happen. You were forced
into proving your superior intelligence by not even having the ability to
stoop all the way down to HIS LEVEL OF EXPERIENCE..

But then again, newbies should just go back to Windows were they belong,
right? Linux is for "real" men with "real" programming skills.

> Why would you need help? It says it can't open its database and gives
> you the reason. Surely the next question should be
> "where is the database" or "how do I find out", not "any help
> appreciated ..."?


------------------------------

From: [EMAIL PROTECTED] (Scott Alfter)
Subject: Re: Netscape is the best web brower for Linux? Where is the alternative?
Date: Sat, 02 Sep 2000 19:23:04 GMT

=====BEGIN PGP SIGNED MESSAGE=====
Hash: SHA1

In article <8ol1q6$m4h$[EMAIL PROTECTED]>, Hans  <[EMAIL PROTECTED]> wrote:
>I need an web browser is more stable than Netscape. :-)

The purists will hate me for this, but here goes:

1) Install VMware.
2) Install Win9x (95 or 98...doesn't matter for your purposes) under VMware.
3) Install IE 5.5 under Win9x.

If you have enough RAM to do this (at least 128 megs; I have 256), it'll
work.  If Win9x eats itself under VMware (and under VMware, it happens less
often than usual), your Linux system keeps chugging along.  To paraphrase
what IBM used to say about OS/2, VMware enables a better Windows than
Windows.

  _/_
 / v \
(IIGS(  Scott Alfter (remove Voyager's hull number for email address)
 \_^_/  http://salfter.dyndns.org
=====BEGIN PGP SIGNATURE=====
Version: GnuPG v1.0.2 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE5sVTbVgTKos01OwkRAmpvAKDHZJuIwbUguPat7HNq6RPuI7Zf2ACg0m69
geFSaW6jGD5ZGz4i4cFqicg=
=rph9
=====END PGP SIGNATURE=====

------------------------------

From: "Robert L. Klungle" <[EMAIL PROTECTED]>
Subject: Updated version of hinv perl script
Date: Sat, 02 Sep 2000 19:44:57 GMT

I acquired a copy of the hinv script on the net (don't remember where)
several years ago. Haven't seen any updates since. A couple of days ago
I noticed that some of the elements were no longer there or were wrong
(apparently Linux has changed). So modified and added to get to 2.1.13.
Quick hack so not the best.
If anyone knows of anyother updates, wouild like to see/have them.
Here is my current one.

#!/usr/bin/perl -w

# Try and emulate SGI's hinv command
# We want to figure out the following:
# CPU type, mhz, memory, busses, floppies, disks, tapes, cdroms, ttys,
# networks, graphics.

# indy ~ hinv
# Iris Audio Processor: version A2 revision 4.1.0
# 1 175 MHZ IP22 Processor
# FPU: MIPS R4000 Floating Point Coprocessor Revision: 0.0
# CPU: MIPS R4400 Processor Chip Revision: 6.0
# On-board serial ports: 2
# On-board bi-directional parallel port
# Data cache size: 16 Kbytes
# Instruction cache size: 16 Kbytes
# Secondary unified instruction/data cache size: 1 Mbyte on Processor 0
# Main memory size: 64 Mbytes
# Vino video: unit 0, revision 0
# Integral ISDN: Basic Rate Interface unit 0, revision 1.0
# XPI FDDI controller: xpi0, firmware version 9601221233, SAS
# Integral Ethernet: ec0, version 1
# Integral SCSI controller 0: Version WD33C93B, revision D
#  Disk drive: unit 2 on SCSI controller 0
#  Disk drive: unit 1 on SCSI controller 0
# Graphics board: Indy 24-bit

# i586 ~ hinv
# Main memory size: 24 Mbytes
# 1 GenuineIntel 586 processor
# 1 16450 serial port
# 2 16550A serial ports
# 1 post-1991 82077 floppy controller
# 1 1.44M floppy drive
# 1 vga+ graphics device
# 1 keyboard
# 2 ethernet interfaces
#   eth0: 3Com 3c595 Vortex 100baseTX
open(FD, "dmesg|") || die "no dmesg";
while (<FD>) {
        @_ = split;
        if (/^tty/) {
                $ttys{$_[$#_]}++;
        } elsif (/^Floppy/) {
                $floppy{$_[$#_]}++;
        } elsif (/^FDC /) {
                s/.*is a //;
                chop;
                $fdc{$_}++;
        } elsif (/^scsi : detected/) {
                $scsi = $_;
        } elsif (/^eth\d.* at /) {
                s/\s*at .*//;
                push(@eth, $_);
        }
}
open(FD, "/proc/cpuinfo");
while (<FD>) {
        @_ = split;
        if (/model name/) {
                $modelname = "$_[3] $_[4] $_[5]";
        }
        if (/cpu MHz/) {
                $speed = $_[3];
        }
}
open(FD, "/proc/cpuinfo");
while (<FD>) {
        @_ = split;
        if (/vendor_id/) {
                $cpus{"$_[$#_] $modelname"}++;
        }
}
open(FD, "/proc/ioports");
while (<FD>) {
        if (/keyboard/) {
                $kbd++;
        } elsif (/vga/) {
                @_ = split;
                $graphics{$_[$#_]}++;
        } elsif (/timer/) {
                $tmr++
        }
}
open(FD, "/proc/meminfo");
while (<FD>) {
        @_ = split;
        if (/^Mem: /) {
                $_[1] /= 1024;
                $mem = "Main memory size: $_[1] Mbytes\n";
        }
}
if (-e "/proc/parport/0/hardware") {}
if (-e "/proc/ide/hdb/model") {
        open(FD, "/proc/ide/hdb/model");
        $hdb = <FD>;
        $ides++;
}
if (-e "/proc/ide/hdc/model") {
        open(FD, "/proc/ide/hdc/model");
        $hdc = <FD>;
        $ides++;
}
if (-e "/proc/ide/hdd/model") {
        open(FD, "/proc/ide/hdd/model");
        $hdd = <FD>;
        $ides++;
}

print $mem if (defined $mem);
foreach $key (keys %cpus) {
        print "$cpus{$key} $key $speed MHz processor";
        print $cpus{$key} > 1 ? "s\n" : "\n";
}
foreach $key (keys %ttys) {
        print "$ttys{$key} $key serial port";
        print $ttys{$key} > 1 ? "s\n" : "\n";
}
foreach $key (keys %fdc) {
        print "$fdc{$key} $key floppy controller";
        print $fdc{$key} > 1 ? "s\n" : "\n";
}
foreach $key (keys %floppy) {
        print "$floppy{$key} $key floppy drive";
        print $floppy{$key} > 1 ? "s\n" : "\n";
}
foreach $key (keys %graphics) {
        print "$graphics{$key} $key graphics device";
        print $graphics{$key} > 1 ? "s\n" : "\n";
}
if (defined $tmr) {
        print "$tmr timer controller\n";
}
if (defined $kbd) {
        print "$kbd keyboard";
        print $kbd > 1 ? "s\n" : "\n";
}
if (defined $ppt) {
        print "$ppt parallel port";
        print $ppt > 1 ? "s\n" : "\n";
}
if ($#eth > -1) {
        $n = $#eth + 1;
        print "$n ethernet interface";
        print $n > 1 ? "s\n" : "\n";
        foreach $eth (@eth) {
                print "  $eth";
        }
}
if (defined $hda) {
        print "$ides IDE device";
        print $ides > 1 ? "s\n" : "\n";
        print "  $hda";
}
if (defined $hdb) {
        print "  $hdb";
}
if (defined $hdc) {
        print "  $hdc";
}

        $ppt++;
}
if (-e "/proc/parport/1/hardware") {
        $ppt++;
}
if (-e "/proc/ide/hda/model") {
        open(FD, "/proc/ide/hda/model");
        $hda = <FD>;
        $ides++;
}
if (-e "/proc/ide/hdb/model") {
        open(FD, "/proc/ide/hdb/model");
        $hdb = <FD>;
        $ides++;
}
if (-e "/proc/ide/hdc/model") {
        open(FD, "/proc/ide/hdc/model");
        $hdc = <FD>;
        $ides++;
}
if (-e "/proc/ide/hdd/model") {
        open(FD, "/proc/ide/hdd/model");
        $hdd = <FD>;
        $ides++;
}

print $mem if (defined $mem);
foreach $key (keys %cpus) {
        print "$cpus{$key} $key $speed MHz processor";
        print $cpus{$key} > 1 ? "s\n" : "\n";
}
foreach $key (keys %ttys) {
        print "$ttys{$key} $key serial port";
        print $ttys{$key} > 1 ? "s\n" : "\n";
}
foreach $key (keys %fdc) {
        print "$fdc{$key} $key floppy controller";
        print $fdc{$key} > 1 ? "s\n" : "\n";
}
foreach $key (keys %floppy) {
        print "$floppy{$key} $key floppy drive";
        print $floppy{$key} > 1 ? "s\n" : "\n";
}
foreach $key (keys %graphics) {
        print "$graphics{$key} $key graphics device";
        print $graphics{$key} > 1 ? "s\n" : "\n";
}
if (defined $tmr) {
        print "$tmr timer controller\n";
}
if (defined $kbd) {
        print "$kbd keyboard";
        print $kbd > 1 ? "s\n" : "\n";
}
if (defined $ppt) {
        print "$ppt parallel port";if (defined $hdd) {
        print "  $hdd";
}
if (defined $scsi) {
        $scsi =~ s/.*detected //;
        $scsi =~ s/ total.//;
        print $scsi;
        open(FD, "/proc/scsi/scsi");
        $_ = <FD>;
        while (<FD>) {
                next unless /Vendor/;
                s/.*Vendor:\s*//;
                s/\s*Rev:.*//;
                s/Model:\s*//;
                print "  $_";
        }
}
open(FD, "/proc/pci");
$done = 0;
while (<FD>) {
        if (/^\s*Bus/) {
                if ($done == 0) {
                        print "PCI bus devices:\n";
                        $done++;
                }
                $_ = <FD>;
                print;
        }
}

        print $ppt > 1 ? "s\n" : "\n";
}
if ($#eth > -1) {
        $n = $#eth + 1;
        print "$n ethernet interface";
        print $n > 1 ? "s\n" : "\n";
        foreach $eth (@eth) {
                print "  $eth";
        }
}
if (defined $hda) {
        print "$ides IDE device";
        print $ides > 1 ? "s\n" : "\n";
        print "  $hda";
}
if (defined $hdb) {
        print "  $hdb";
}
if (defined $hdc) {
        print "  $hdc";
}



------------------------------


** FOR YOUR REFERENCE **

The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:

    Internet: [EMAIL PROTECTED]

You can send mail to the entire list (and comp.os.linux.misc) via:

    Internet: [EMAIL PROTECTED]

Linux may be obtained via one of these FTP sites:
    ftp.funet.fi                                pub/Linux
    tsx-11.mit.edu                              pub/linux
    sunsite.unc.edu                             pub/Linux

End of Linux-Misc Digest
******************************

Reply via email to