[aklug] Re: Self-extracting Archive

From: Marc <marc@interak.com>
Date: Sat May 09 2009 - 00:21:27 AKDT

Yup.... In essence his problem wasn't with the script but with the
failure to delete the leftovers LOL .... Arguably a bug in mktemp as
it does not recover, though there are versions that don't hang - I
snifffed about (as i had not seen the -p flag you mentioned beforr)
and was surprised at the number of variations in mktemp out there

On May 8, 2009, at 7:53 PM, Matt Grimm <matt.t.grimm@gmail.com> wrote:

> mktemp will work (i.e. , create the directory you told it to create)
> if you do not use this feature
>
> How odd -- mktemp will happily create your non-unique temporary file/
> directory as long as it does not already exist. If the file or dir
> does exist, mktemp hangs indefinitely, which is probably what caused
> Chris' original script to hang.
>
> Note that all of these examples were hung until I hit ^C:
>
> $ ls selfextract.1029349304
> selfextract.1029349304
> $ mktemp -d selfextract.1029349304
> ^C
> $ mktemp -d /tmp/selfextract.1029349304
> ^C
> $ mktemp -p /tmp -d selfextract.1029349304
> ^C
> $ mktemp -p /tmp selfextract.1029349304
> ^C
> $ mktemp selfextract.1029349304
> ^C
> $
>
>
>
> On Fri, May 8, 2009 at 6:00 PM, Marc Grober <marc@interak.com> wrote:
> some apples and oranges there....
> all -p does is add a prefix, and it is not universally
> available.
> mktemp -d /tmp/selfextract.XXXXXX
> is going to do the same thing as
> mktemp -p /tmp -d selfextract.XXXXXX
> I believe.....
>
> the XXXX is the reason to use mktemp in one sense, as it
> uses the XXXXXs for a template, but mktemp will work (i.e. ,
> create the directory you told it to create) if you do not
> use this feature.
>
> Christopher Howard wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Matt Grimm wrote:
> >> Chris,
> >>
> >> You are trying to create a temporary directory name, but aren't
> giving
> >> mktemp anyplace to insert random data. Try this instead:
> >>
> >> mktemp -p /tmp -d selfextract.XXXXXXXXXX
> >>
> >
> > Ah, yes... that fixed the problem.
> >
> > I'm going to go change my name now.
> >
> > - --
> > Christopher Howard
> > http://indicium.us
> > http://theologia.indicium.us
> >
> > I digitally sign /all/ of my e-mails via PGP. If you receive any e-
> mails
> > supposedly from me without my valid PGP signature, please take
> > additional steps to verify the authenticity of the message.
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.4.9 (GNU/Linux)
> > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> >
> > iEYEARECAAYFAkoE4lwACgkQQ5FLNdi0BcUioQCeKiHSeFzzlpLMbN1hocIKl6Uz
> > qugAnjb0Wcl5NWqzoJM4V92Rsfmvj9Q9
> > =Hz62
> > -----END PGP SIGNATURE-----
> > ---------
> > To unsubscribe, send email to <aklug-request@aklug.org>
> > with 'unsubscribe' in the message body.
> >
>
>
>
> -- Binary/unsupported file stripped by Ecartis --
> -- Type: application/x-pkcs7-signature
> -- File: smime.p7s
> -- Desc: S/MIME Cryptographic Signature
>
>
> ---------
> To unsubscribe, send email to <aklug-request@aklug.org>
> with 'unsubscribe' in the message body.
>
>

---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Sat May 9 00:21:37 2009

This archive was generated by hypermail 2.1.8 : Sat May 09 2009 - 00:21:37 AKDT