Re: Make hardlinking kernel-devel optional

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Once upon a time, Arjan van de Ven <arjan@xxxxxxxxxxxxx> said:
> On Tue, 2006-01-31 at 20:48 -0500, Dave Jones wrote:
> >  > Another though: why the "find | while ; do hardlink"?  You should just
> >  > be able to do:
> >  > 
> >  > if [ -x /usr/sbin/hardlink ] ; then
> >  >   /usr/sbin/hardlink /usr/src/kernels/*FC*
> >  > fi
> >  > 
> >  > The post script is forking hardlink over 5000 times as well as causing
> >  > thousands of repeated directory lookups by find and the shell (that
> >  > hardlink then has to do anyway), instead of just letting one run of
> >  > hardlink do its job (it should recurse just fine).
> > 
> > I've often wondered why it was written that way too.
> > Arjan, do you recall?
> 
> if you have too many kernels, the direct commandline approach overflows
> the maximum length.

The current script has exactly the same problem then:

if [ -x /usr/sbin/hardlink ] ; then
  pushd /usr/src/kernels/2.6.15-1.1884_FC5-i686 > /dev/null
  /usr/bin/find . -type f | while read f; do hardlink -c /usr/src/kernels/*FC*/$f $f ; done
  popd > /dev/null
fi

The "*FC*" bit is in there as well; there is no difference with what I
posted above.

If you want to avoid wildcards, just do:

if [ -x /usr/sbin/hardlink ] ; then
  /usr/sbin/hardlink /usr/src/kernels
fi

and let anyone that installs their own kernel source under there get
hardlinked as well.
-- 
Chris Adams <cmadams@xxxxxxxxxx>
Systems and Network Administrator - HiWAAY Internet Services
I don't speak for anybody but myself - that's enough trouble.

-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux