[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [dmidecode] Re: dmidecode for DOS?
From: |
Jean Delvare |
Subject: |
Re: [dmidecode] Re: dmidecode for DOS? |
Date: |
Tue, 13 Sep 2005 07:54:28 +0200 |
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