Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Jun 2011 23:45:26 -0400
From:      jhell <jhell@DataIX.net>
To:        freebsd-rc@freebsd.org
Subject:   [PATCH] Knock out two if statements, one eval & IDCMD with builtin test.
Message-ID:  <20110615034526.GA12185@DataIX.net>

next in thread | raw e-mail | index | archive | help

--jho1yZJdad60DJr+
Content-Type: multipart/mixed; boundary="OgqxwSJOaUobr8KG"
Content-Disposition: inline


--OgqxwSJOaUobr8KG
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline


After looking over Jilles patch on this same list it made ID & IDCMD
catch my eye when I seen the $(eval $IDCMD) where it was the only place
it was used throughout the whole system in which it calls another if
statement from IDCMD to check the presence of /usr/bin/id.

This is not bad at all, don't get me wrong but this could be done from
one location to knock out the eval and two if statements with one
builtin test right from the ID variable itself and get rid of the need
for the IDCMD.

Slight speed improvement ? maybe... cleaner yes.

As for functionality can anyone think of a need to wait for processing
this till run_rc_command is thrown ? if so should it be escaped and
re-eval'd as $(eval \$ID) or something similiar later ?


--OgqxwSJOaUobr8KG--

--jho1yZJdad60DJr+
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (FreeBSD)
Comment: http://bit.ly/0x89D8547E

iQEcBAEBAgAGBQJN+CrUAAoJEJBXh4mJ2FR+K9wIAIo9zUUKRRB0TzPqzBpmz8gb
Q6XvX3vzUXHgEA4YOwte7a30wTt4RKwRloORCYljqMtgooCbuDwlTt/8b7UqRfyC
pCsXoyB3jy2VAbF9G4TH2iVLu5/qzA28n5RMpUrcrJdwqGh21ADLF3LZsDIb3nIR
myzf9xDPevlhlpbe+bDs9aRjEgiZQbqM/9JnMOBfcJU1PHf1+4eJ6N4Pcj2m65mZ
zgCBMRBgvjLWD3J6jsEPG5llOaTkYwNEvh8szuChemWGOXxDldhQn5WAQUzG5kGA
YVzxdGg21H/VCxLX/nRj09Tq/7XbMRFCju88qslCJ5fBC7h3sXvGvGBm8/QUo3g=
=Tfkj
-----END PGP SIGNATURE-----

--jho1yZJdad60DJr+--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110615034526.GA12185>