From d9aeaacb6fe1107902ae1f519edfa84df8dce35b Mon Sep 17 00:00:00 2001 From: Makoto Matsushita Date: Mon, 19 Jan 2004 13:35:46 +0000 Subject: [PATCH] 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 --- release/Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/release/Makefile b/release/Makefile index d07116eaf6c..4ea18519c42 100644 --- a/release/Makefile +++ b/release/Makefile @@ -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}