Alexander Skwar wrote:
>
> So sprach Gleydson Mazioli da Silva am Sat, Jun 16, 2001 at 10:40:20PM -0400:
> > Humm, it do the same job for Linux systems, I need to know if it exist
>
> What Linux distribution ships with "tempfile"? I just had a look
> rpmfind.net, and none of the RPM based distributions has got a package
> called called tempfile or a package containing an executable called
> tempfile.
mktemp is more portable really.
>
> Uhm, BTW: Why are you checking for tempfile at all? A grep for "tempfile"
> revealed, that you always do:
>
> L_TMPFILE=`tempfile 2>/dev/null` || L_TMPFILE=/tmp/temp$$
This block is checked by all cdcontrol childrens process to write to the
same file
(the reporting file), the lockfile is needed in this case
> So, if tempfile cannot be run or yields an error, you set the tempfile name
> in the portable way J�rg mentioned.
Yes, I agree
> Also I wonder why you are using "mc" to view a file. I'd suggest to use
> less. And for users of real unices who are stuck with more, more should be
> used.
Humm, this was my mistaken...
> Gleydson: At the beginning of the 'memoria-cd' script, you calculate:
>
> if [ $(echo \(${SYS_MEM}-\(${CACHE}*${WRITTERS}\)\)-4|bc) -lt 0 ];then
>
> The error message that you print doesn't really help. IMHO it would be
> better, if you'd also say that the error is because there isn't enough
> SYS_MEM set apart. And the * in the line should be escaped, I think.
>
> J�rg: Does the ps on "real" Unices support this: ps ax --sort=ppid ?
No, I would need a better way to do the same job :-(
> Gleydson: The amount of system memory can be calculated by:
>
> ls -lh /proc/kcore | awk '{ print $5 }' | sed 's|M||'
> Yes, this is not portable. Is this more portable?
>
> free | grep 'Mem:' | awk '{ print $2 }' | sed 's|M||'
The non portable memory checking was already removed, you suggestion is
really a lot better and more clean :-)
> Okay, other than that, the program looks good. Not that I might use it,
> because I'm not burning multiple images at the same time, but for people who
> do so, it might be quite handy.
Thanks for your patches :-))
---------------------------
Gleydson Mazioli da Silva
[EMAIL PROTECTED]
[EMAIL PROTECTED]
* O que abunda n�o prejudica ( do latim - quid abundat non nocere)
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]