handle /etc/blacklistd.conf

This commit is contained in:
christos 2020-06-15 21:56:49 +00:00
parent 6d0b1957e8
commit e9d9ed6853
1 changed files with 6 additions and 2 deletions

View File

@ -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 @@ fixblock() {
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 @@ do_blocklist()
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