From 679b9b10d2f7af4b1e0910de9e09cc871eec2238 Mon Sep 17 00:00:00 2001 From: Florent Thoumie Date: Thu, 12 Jan 2006 12:35:03 +0000 Subject: - Adding sensible defaults to the startup script so people don't need to touch /etc/rc.conf anymore. - Silent @dirrm for ldconfig directories, this ensures a quiet upgrade. - Fix installation with package, directories weren't created. Noticed by: pav --- misc/ldconfig_compat/Makefile | 11 ++++++----- misc/ldconfig_compat/files/ldconfig_compat.sh.in | 5 ++++- misc/ldconfig_compat/pkg-message | 10 ---------- 3 files changed, 10 insertions(+), 16 deletions(-) delete mode 100644 misc/ldconfig_compat/pkg-message diff --git a/misc/ldconfig_compat/Makefile b/misc/ldconfig_compat/Makefile index fdc46220fdfa..c568f02d76bf 100644 --- a/misc/ldconfig_compat/Makefile +++ b/misc/ldconfig_compat/Makefile @@ -7,7 +7,7 @@ PORTNAME= ldconfig_compat PORTVERSION= 1.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= misc MASTER_SITES= # none DISTFILES= # none @@ -22,6 +22,9 @@ USE_RC_SUBR= yes LOCAL_DIRS= ${LDCONFIG_DIR} \ ${LDCONFIG32_DIR} +SUB_LIST= LDCONFIG_DIR=${LDCONFIG_DIR} \ + LDCONFIG32_DIR=${LDCONFIG32_DIR} + .include .include "${.CURDIR}/bsd.ldconfig.mk" @@ -48,11 +51,9 @@ do-install: @${ECHO_CMD} "@cwd ${prefix}" >> ${TMPPLIST} .for dir in ${LOCAL_DIRS} @${MKDIR} ${prefix}/${dir} - @${ECHO_CMD} "@dirrm ${dir}" >> ${TMPPLIST} + @${ECHO_CMD} "@exec mkdir %D/${dir}" >> ${TMPPLIST} + @${ECHO_CMD} "@unexec rmdir %D/${dir} 2>/dev/null || true" >> ${TMPPLIST} .endfor .endfor -post-install: - ${CAT} ${PKGMESSAGE} - .include diff --git a/misc/ldconfig_compat/files/ldconfig_compat.sh.in b/misc/ldconfig_compat/files/ldconfig_compat.sh.in index fe8abc2d2a61..8e7db265cfee 100644 --- a/misc/ldconfig_compat/files/ldconfig_compat.sh.in +++ b/misc/ldconfig_compat/files/ldconfig_compat.sh.in @@ -14,6 +14,10 @@ ldconfig_command="/sbin/ldconfig" start_cmd="ldconfig_start" stop_cmd=":" +load_rc_config $name +: ${ldconfig_local_dirs="%%PREFIX%%/%%LDCONFIG_DIR%% %%X11BASE%%/%%LDCONFIG_DIR%%"} +: ${ldconfig_local32_dirs="%%PREFIX%%/%%LDCONFIG32_DIR%% %%X11BASE%%/%%LDCONFIG32_DIR%%"} + ldconfig_start() { _ins= @@ -44,5 +48,4 @@ ldconfig_start() fi } -load_rc_config $name run_rc_command "$1" diff --git a/misc/ldconfig_compat/pkg-message b/misc/ldconfig_compat/pkg-message deleted file mode 100644 index ee91a3d810be..000000000000 --- a/misc/ldconfig_compat/pkg-message +++ /dev/null @@ -1,10 +0,0 @@ -------------------------------------------------------------- -For the script to work correctly, you need to add the -following to your /etc/rc.conf file (these lines are only -wrapped to fit console width): - - ldconfig_local_dirs="/usr/local/libdata/ldconfig - /usr/X11R6/libdata/ldconfig" - ldconfig_local32_dirs="/usr/local/libdata/ldconfig32 - /usr/X11R6/libdata/ldconfig32" -------------------------------------------------------------- -- cgit v1.2.3