Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/postinstall handle /etc/blacklistd.conf



details:   https://anonhg.NetBSD.org/src/rev/b9c133c3aa64
branches:  trunk
changeset: 934675:b9c133c3aa64
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Jun 15 21:56:49 2020 +0000

description:
handle /etc/blacklistd.conf

diffstat:

 usr.sbin/postinstall/postinstall.in |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (31 lines):

diff -r 9d2e70013277 -r b9c133c3aa64 usr.sbin/postinstall/postinstall.in
--- a/usr.sbin/postinstall/postinstall.in       Mon Jun 15 21:52:03 2020 +0000
+++ b/usr.sbin/postinstall/postinstall.in       Mon Jun 15 21:56:49 2020 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: postinstall.in,v 1.26 2020/06/15 21:51:13 christos Exp $
+# $NetBSD: postinstall.in,v 1.27 2020/06/15 21:56:49 christos Exp $
 #
 # Copyright (c) 2002-2015 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -851,7 +851,7 @@
                fi
                local p=$(stat -f %Lp "$i")
                chmod u+w "$i"
-               sed -i -e s/black/block/g "$i"
+               sed -i -e 's/\([bB]\)lack/\1lock/g' "$i"
                chmod "$p" "$i"
        done
 }
@@ -868,6 +868,10 @@
        if [ -f /var/db/blacklist.db ]; then
                mv /var/db/blacklist.db /var/db/blocklist.db
        fi
+       if [ -f /etc/blacklistd.conf ]; then
+               mv /etc/blacklistd.conf /etc/blocklistd.conf
+               fixblock /etc/blocklistd.conf
+       fi
 
        # if we have fixed the rc files we are done
        if ! grep -qs $rcfiles; then



Home | Main Index | Thread Index | Old Index