Fix "5.x release on 4.x box" support.

It is required to check /etc/rc.d/ldconfig before use, because
${CHROOT} sandbox is sometimes 4.x world.  If /etc/rc.d/ldconfig
is not there, run ldconfig(8) directly.

Discussed with: imp, obrien, ru
This commit is contained in:
Makoto Matsushita 2004-01-19 13:35:46 +00:00
parent 146dec80e1
commit d9aeaacb6f

View File

@ -458,7 +458,11 @@ release rerelease:
# NB: these may fail if the host is running w/o devfs
echo "umount /dev >/dev/null 2>&1 || true" >> ${_MK}
echo "mount -t devfs devfs /dev >/dev/null 2>&1 || true" >> ${_MK}
echo "/etc/rc.d/ldconfig start" >> ${_MK}
echo "if [ -x /etc/rc.d/ldconfig ]; then" >> ${_MK}
echo " /etc/rc.d/ldconfig start" >> ${_MK}
echo "else" >> ${_MK}
echo " ldconfig /lib /usr/lib /usr/local/lib || true" >> ${_MK}
echo "fi" >> ${_MK}
echo "if [ ! -f /tmp/.world_done ]; then" >> ${_MK}
echo " cd /usr/src" >> ${_MK}
echo " ${CROSSMAKE} ${WORLD_FLAGS} -DNOCLEAN buildworld && \\" >> ${_MK}