|
发表于 2007-12-16 21:29:29
|
显示全部楼层
- if [ -r /proc/ksyms ]; then
- echo "FATAL: you need to be running a 2.6.x kernel in order to upgrade"
- echo "to this version of glibc."
- echo
- sleep 999
- exit 1
- fi
- # Next, stop using the /lib/ntpl libraries. These are now obsolete and
- # will break the installation if present:
- if [ -d lib/tls ]; then
- mkdir -p lib/obsolete
- mv lib/tls lib/obsolete
- fi
- if [ -x sbin/ldconfig ]; then
- sbin/ldconfig -r .
- fi
- # Install NPTL glibc libraries:
- if [ -x /sbin/ldconfig -a -d lib/incoming ]; then # swap on the fly
- # First create copies of the incoming libraries:
- ( cd lib/incoming
- for file in * ; do
- if [ ! -r ../${file}.incoming ]; then
- cp -a $file ../${file}.incoming
- fi
- done
- )
- # Then switch to them all at once:
- /sbin/ldconfig -l lib/*.incoming 2> /dev/null
- # Finally, rename them and clean up:
- ( cd lib
- for file in *.incoming ; do
- rm -f `basename $file .incoming`
- cp -a $file `basename $file .incoming`
- /sbin/ldconfig -l `basename $file .incoming`
- rm -f $file
- done
- )
- else # no ldconfig? Good, it's safe to just jam it on home (and make links below):
- ( cd lib/incoming
- for file in * ; do
- cp -a $file ..
- done
- )
- fi
- # Now, get rid of the temporary directory:
- rm -rf lib/incoming
- # Done installing NPTL glibc libraries.
复制代码
这个是slackware的glibc-solibs-2.5-i486-4.tgz的安装脚本中的关键部分
我直接把
- if [ -x /sbin/ldconfig -a -d lib/incoming ]; then # swap on the fly
- # First create copies of the incoming libraries:
- ( cd lib/incoming
- for file in * ; do
- if [ ! -r ../${file}.incoming ]; then
- cp -a $file ../${file}.incoming
- fi
- done
- )
- # Then switch to them all at once:
- /sbin/ldconfig -l lib/*.incoming 2> /dev/null
- # Finally, rename them and clean up:
- ( cd lib
- for file in *.incoming ; do
- rm -f `basename $file .incoming`
- cp -a $file `basename $file .incoming`
- /sbin/ldconfig -l `basename $file .incoming`
- rm -f $file
- done
- )
- else # no ldconfig? Good, it's safe to just jam it on home (and make links below):
- ( cd lib/incoming
- for file in * ; do
- cp -a $file ..
- done
- )
- fi
复制代码
存成一个脚本使用,比直接cp要好一些,cp一用就挂,这个脚本用了至少shell不挂,但是其它的命令就用不了了
在slackware中使用,出现了segment fault的提示,但是没什么影响 |
|