From bb3fd59b0b521a0197ab22f638d4870bf477d3d1 Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Sun, 29 Apr 2007 22:08:00 +0000 Subject: Change of behaviour for ld.so.cache generation (done by default in Stage1). It can be requested for stage3 by setting of "ldsc" in kernel commandline. "noldsc" is deprecated from this version on ... git-svn-id: http://svn.openslx.org/svn/openslx/trunk@966 95ad53e4-c205-0410-b2fa-d234c58c8868 --- initramfs/initrd-stuff/init | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'initramfs/initrd-stuff/init') diff --git a/initramfs/initrd-stuff/init b/initramfs/initrd-stuff/init index befb4fa6..6825d450 100755 --- a/initramfs/initrd-stuff/init +++ b/initramfs/initrd-stuff/init @@ -145,9 +145,10 @@ in $0\ncountry=\"${COUNTRY}\"" >> /etc/machine-setup filesrc=${opts#file=} rm /tmp/file-done ;; - # if ld.so.cache should not be generated - noldsc) - noldsc=yes;; + # if ld.so.cache should be generated; should be switched on when composing + # rootfs from more than one source + ldsc) + ldsc="yes";; # simple union of base ro rootdir with tempfs on top unionfs) unionfs=1;; @@ -518,7 +519,7 @@ if [ -n "${unionfs}" -o -n "${aufs}" ] ; then # mount $dir unionadd/$dir # unionctl mnt --add --after /mnt --mode ro /unionadd/$dir # most probably it is a good idea to run ldconfig, so enable it - unset noldsc + ldsc="yes" fi # run ldconfig if not switched off via kernel command line ldcfg @@ -560,7 +561,7 @@ elif [ -z "${cowloop}" ] ; then # add list of files to be excluded and common excludes to the filter list echo -e "${D_ETCEXCL}\n@@@COMETCEXCL@@@" >>/tmp/etc.exclude # if ld.so.cache is to be generated then do not copy the file - [ -z "${noldsc}" ] && echo -e "ld.so.cache*" >>/tmp/etc.exclude + [ -n "${ldsc}" ] && echo -e "ld.so.cache*" >>/tmp/etc.exclude # for tar exclude lists might be used, more difficult for cp cd /mnt tar -X /tmp/etc.exclude -cp etc/* | \ @@ -617,7 +618,8 @@ echo -e "rootfs / rootfs rw 0 0\ninitramdevs /dev tmpfs rw\ 0 0" > /mnt/etc/mtab # copy library cache if generated -if [ -z "${noldsc}" ] ; then +if [ -n "${ldsc}" ] ; then + # creating library cache takes a while ... if waitfor /tmp/ldcfg 50000 ; then test -s /mnt/tmp/ld.so.cache && \ mv /mnt/tmp/ld.so.cache /mnt/etc/ld.so.cache -- cgit v1.2.3-55-g7522