Source-Changes-HG archive

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

[src/netbsd-6]: src/usr.sbin/postinstall Pull up following revision(s) (reque...



details:   https://anonhg.NetBSD.org/src/rev/fa21adb0b002
branches:  netbsd-6
changeset: 776997:fa21adb0b002
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Sun Nov 15 16:43:54 2015 +0000

description:
Pull up following revision(s) (requested by dholland in ticket #1312):
        usr.sbin/postinstall/postinstall: revision 1.196 via patch
PR install/50020: postinstall does not check for mandoc in /etc/man.conf.
Add a check, but ask the user to fix manually (the file could have local
modifications).

diffstat:

 usr.sbin/postinstall/postinstall |  31 +++++++++++++++++++++++++++++--
 1 files changed, 29 insertions(+), 2 deletions(-)

diffs (48 lines):

diff -r 6fcd7ba9efb2 -r fa21adb0b002 usr.sbin/postinstall/postinstall
--- a/usr.sbin/postinstall/postinstall  Sun Nov 15 16:40:30 2015 +0000
+++ b/usr.sbin/postinstall/postinstall  Sun Nov 15 16:43:54 2015 +0000
@@ -1,8 +1,8 @@
 #!/bin/sh
 #
-# $NetBSD: postinstall,v 1.129.2.11 2014/05/21 20:29:02 bouyer Exp $
+# $NetBSD: postinstall,v 1.129.2.12 2015/11/15 16:43:54 bouyer Exp $
 #
-# Copyright (c) 2002-2008 The NetBSD Foundation, Inc.
+# Copyright (c) 2002-2015 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # This code is derived from software contributed to The NetBSD Foundation
@@ -1691,6 +1691,33 @@
 }
 
 #
+#      man.conf
+#
+additem manconf "check for a mandoc usage in /etc/man.conf"
+do_manconf()
+{
+       [ -n "$1" ] || err 3 "USAGE: do_manconf  fix|check"
+       op="$1"
+       failed=0
+
+       [ -f "${DEST_DIR}/etc/man.conf" ] || return 0
+       if ${GREP} -w "mandoc" "${DEST_DIR}/etc/man.conf" >/dev/null 2>&1;
+       then
+               failed=0;
+       else
+               failed=1
+               notfixed=""
+               if [ "${op}" = "fix" ]; then
+                       notfixed="${NOT_FIXED}"
+               fi
+               msg "The file /etc/man.conf has not been adapted to mandoc usage, you"
+               msg "probably want to copy a new version over. ${notfixed}"
+       fi
+
+       return ${failed}
+}
+
+#
 #      obsolete
 #      (this item is last to allow other items to move obsolete files)
 #



Home | Main Index | Thread Index | Old Index