diff options
author | Dirk von Suchodoletz | 2007-04-30 00:08:00 +0200 |
---|---|---|
committer | Dirk von Suchodoletz | 2007-04-30 00:08:00 +0200 |
commit | bb3fd59b0b521a0197ab22f638d4870bf477d3d1 (patch) | |
tree | 3e63c2c6251e14b6478e2408a5f575b2ed8acfbd | |
parent | Fixed error from removing of "MAC", check the usage of macaddr for XEN! (diff) | |
download | core-bb3fd59b0b521a0197ab22f638d4870bf477d3d1.tar.gz core-bb3fd59b0b521a0197ab22f638d4870bf477d3d1.tar.xz core-bb3fd59b0b521a0197ab22f638d4870bf477d3d1.zip |
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
-rwxr-xr-x | initramfs/initrd-stuff/bin/servconfig | 5 | ||||
-rw-r--r-- | initramfs/initrd-stuff/etc/functions | 2 | ||||
-rwxr-xr-x | initramfs/initrd-stuff/init | 14 |
3 files changed, 12 insertions, 9 deletions
diff --git a/initramfs/initrd-stuff/bin/servconfig b/initramfs/initrd-stuff/bin/servconfig index ca1ccbb3..42fb0f4a 100755 --- a/initramfs/initrd-stuff/bin/servconfig +++ b/initramfs/initrd-stuff/bin/servconfig @@ -59,8 +59,9 @@ cfgcomplete cp -a /rootfs/* /mnt 2>/dev/null # set greeting and add information on booted system (distro) -len=$(expr length ${SLXVERSION}${DISTRO}) -vdstr="V${SLXVERSION}/${DISTRO})" +distroname=${DISTRO%-*} +len=$(expr length ${SLXVERSION}${distroname}) +vdstr="V${SLXVERSION}/${distroname})" while [ $len -le 28 ] ; do vdstr="$vdstr " len=$(expr $len + 1) diff --git a/initramfs/initrd-stuff/etc/functions b/initramfs/initrd-stuff/etc/functions index 9f5ed45b..fa4f2ba4 100644 --- a/initramfs/initrd-stuff/etc/functions +++ b/initramfs/initrd-stuff/etc/functions @@ -114,7 +114,7 @@ echo "${uptime} s." ############################################################################# # (re)generate dynamic linked libraries cache from /etc/ld.so.conf ldcfg () { -[ -z "${noldsc}" ] && echo -e "$init_ldcfg" && ldconfig /tmp/ld.so.cache & +[ -n "${ldsc}" ] && echo -e "$init_ldcfg" && ldconfig /tmp/ld.so.cache & } ############################################################################# # URI interpreter $1 variable to interprete, $2 type of token to return 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 |