dmidecode-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [dmidecode] Re: dmidecode for DOS?


From: Anderson, Ian
Subject: RE: [dmidecode] Re: dmidecode for DOS?
Date: Tue, 13 Sep 2005 07:11:00 -0400

I'll keep that in mind about the patches.

As for the enviromental variables:

ASSETTAG=`dmidecode -s chassis-asset-tag` SERIALNO=`dmidecode -s
chassis-serial-number` MODEL=`dmidecode -s system-product-name`

echo set assettag=$ASSETTAG > env.bat
echo set serialno=$SERIALNO >> env.bat
echo set model=$MODEL >> env.bat

does not work under DOS. :(

Ian

-----Original Message-----
From: address@hidden
[mailto:address@hidden On
Behalf Of Jean Delvare
Sent: September 13, 2005 1:54 AM
To: address@hidden
Subject: Re: [dmidecode] Re: dmidecode for DOS?

Hi Ian,

[Ian Anderson]
> Sorry to hear that, I was hoping that integrating the patches would 
> garner attention from someone who has actually done some DOS C 
> programming and clean them up (assuming they can be).

That's actually the other way around. I could integrate clean patches if
they existed. All you sent to me are modified files that work for your
FreeDOS environment but break dmidecode for every over environment.
There's nothing I can do with such files.

The good thing still is that the files you sent are now in the
dmidecode-devel mailing list archive, which makes it possible for others to
pick them up, and maybe someone will send clean patches based on that
someday.

> On a related note, would it be possible to a another switch that would 
> add a chunk of text before an -s tag output?
> I'd like to be able to create a batch file/shell script that can do 
> the following
> 
> dmidecode -s chassis-asset-tag -e set assettag= > env.bat dmidecode -s 
> chassis-serial-number -e set serialno= > env.bat dmidecode -s 
> system-product-name -e set model= > env.bat
> 
> and then env.bat would be
> set assettag=[assettag]
> set serialno=[serialno]
> set model=[model]

This doesn't sound like the right way to do things. Better store the strings
returned by dmidecode -s into variables, and use them afterwards. The
following works for me:

--8<--
#!/bin/sh

ASSETTAG=`dmidecode -s chassis-asset-tag` SERIALNO=`dmidecode -s
chassis-serial-number` MODEL=`dmidecode -s system-product-name`

echo set assettag=$ASSETTAG > env.bat
echo set serialno=$SERIALNO >> env.bat
echo set model=$MODEL >> env.bat
--8<--

BTW, I just noticed that the strings may be padded with spaces, which -s
should probably remove to make the returned strings more suitable for
scripting. I'll work on that later this week.

--
Jean Delvare


_______________________________________________
http://lists.nongnu.org/mailman/listinfo/dmidecode-devel




reply via email to

[Prev in Thread] Current Thread [Next in Thread]