Re: [alsa-devel] PATCH for alsa-info.sh - using mktemp for instead of hardcoded temp dir.
At Thu, 28 Feb 2008 02:42:20 +1000, Travis Place wrote:
On Thu, 28 Feb 2008 2:39:16 am you wrote:
At Thu, 28 Feb 2008 00:36:52 +1000,
Travis Place wrote:
Email subject should explain well enough.
I see some problems with this change:
- it doesn't work if /tmp/alsainfo doesn't exist
- temp directory isn't removed if --no-upload is given
I think you should avoid --tempdir=xxx with mktemp.
The output file name is another question. IMO, it'd be better to pass the output file name via a command line option, and put it on the home directory (e.g. ~/alsa-info.out) as default rather than /tmp.
well, /tmp/alsainfo/ will exist, as we create it in the script.. its $ALSAINFODIR .. the temp dir is then created inside that.
It's created too late. And, if we create /tmp/alsainfo, there is little merit of mktemp as /tmp/alsainfo could be a symlink. Simply TEMPDIR should be what mktemp creates, and clean it up after quitting.
As for not being cleaned up, if --no-upload is specified, ill check that now..
Also, is outputting the resulting file to ~/ wise ?
It's at least safer than the fixed filename on /tmp. I don't insist on this option, though.
Anyway, --output-file=xxx would be a nice addition.
should this occur even if the result is uploaded, or only on --no-upload ?
I don't think it's needed when uploaded (except for any debugging reason).
Just my $0.02.
thanks,
Takashi
On Thu, 28 Feb 2008 3:04:06 am Takashi Iwai wrote:
At Thu, 28 Feb 2008 02:42:20 +1000,
Travis Place wrote:
On Thu, 28 Feb 2008 2:39:16 am you wrote:
At Thu, 28 Feb 2008 00:36:52 +1000,
Travis Place wrote:
Email subject should explain well enough.
I see some problems with this change:
- it doesn't work if /tmp/alsainfo doesn't exist
- temp directory isn't removed if --no-upload is given
I think you should avoid --tempdir=xxx with mktemp.
The output file name is another question. IMO, it'd be better to pass the output file name via a command line option, and put it on the home directory (e.g. ~/alsa-info.out) as default rather than /tmp.
well, /tmp/alsainfo/ will exist, as we create it in the script.. its $ALSAINFODIR .. the temp dir is then created inside that.
It's created too late. And, if we create /tmp/alsainfo, there is little merit of mktemp as /tmp/alsainfo could be a symlink. Simply TEMPDIR should be what mktemp creates, and clean it up after quitting.
As for not being cleaned up, if --no-upload is specified, ill check that now..
Also, is outputting the resulting file to ~/ wise ?
It's at least safer than the fixed filename on /tmp. I don't insist on this option, though.
Anyway, --output-file=xxx would be a nice addition.
should this occur even if the result is uploaded, or only on --no-upload ?
I don't think it's needed when uploaded (except for any debugging reason).
Just my $0.02.
thanks,
Takashi _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
I will impement this all correctly tomorrow.. why do i always decide to tinker at about 3am ? heh
Nice to see other people adding to the script too..
participants (2)
-
Takashi Iwai
-
Travis Place