Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/postinstall don't try to install rc scripts for pro...



details:   https://anonhg.NetBSD.org/src/rev/ab2f02ff806a
branches:  trunk
changeset: 350284:ab2f02ff806a
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Jan 09 19:51:31 2017 +0000

description:
don't try to install rc scripts for programs not installed

diffstat:

 usr.sbin/postinstall/postinstall |  16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diffs (45 lines):

diff -r a7eb2ecf542d -r ab2f02ff806a usr.sbin/postinstall/postinstall
--- a/usr.sbin/postinstall/postinstall  Mon Jan 09 17:41:03 2017 +0000
+++ b/usr.sbin/postinstall/postinstall  Mon Jan 09 19:51:31 2017 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: postinstall,v 1.208 2017/01/07 19:55:35 christos Exp $
+# $NetBSD: postinstall,v 1.209 2017/01/09 19:51:31 christos Exp $
 #
 # Copyright (c) 2002-2015 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -1488,7 +1488,13 @@
        local op=$1
        local dir=$2
        local name=$3
-       local rcdir=$4
+       local bindir=$4
+       local rcdir=$5
+
+       if [ ! -x "${DEST_DIR}/${bindir}/${name}" ]; then
+               return 0
+       fi
+
        if ! find_file_in_dirlist "${name}" "${name}" \
            "${rcdir}" "${SRC_DIR}/etc/rc.d"; then
                return 1
@@ -1523,15 +1529,15 @@
                ${extra_scripts}
        failed=$(( ${failed} + $? ))
 
-       update_rc "${op}" "${dir}" blacklistd \
+       update_rc "${op}" "${dir}" blacklistd /sbin \
            "${SRC_DIR}/external/bsd/blacklist/etc/rc.d"
        failed=$(( ${failed} + $? ))
 
-       update_rc "${op}" "${dir}" unbound \
+       update_rc "${op}" "${dir}" unbound /usr/sbin \
            "${SRC_DIR}/external/bsd/unbound/etc/rc.d"
        failed=$(( ${failed} + $? ))
 
-       update_rc "${op}" "${dir}" nsd \
+       update_rc "${op}" "${dir}" nsd /usr/sbin \
            "${SRC_DIR}/external/bsd/nsd/etc/rc.d"
        failed=$(( ${failed} + $? ))
 



Home | Main Index | Thread Index | Old Index