Module Name:    src
Committed By:   martin
Date:           Thu Jul  2 09:53:12 UTC 2015

Modified Files:
        src/usr.sbin/postinstall: postinstall

Log Message:
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).


To generate a diff of this commit:
cvs rdiff -u -r1.195 -r1.196 src/usr.sbin/postinstall/postinstall

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/postinstall/postinstall
diff -u src/usr.sbin/postinstall/postinstall:1.195 src/usr.sbin/postinstall/postinstall:1.196
--- src/usr.sbin/postinstall/postinstall:1.195	Thu Jul  2 09:31:56 2015
+++ src/usr.sbin/postinstall/postinstall	Thu Jul  2 09:53:12 2015
@@ -1,8 +1,8 @@
 #!/bin/sh
 #
-# $NetBSD: postinstall,v 1.195 2015/07/02 09:31:56 martin Exp $
+# $NetBSD: postinstall,v 1.196 2015/07/02 09:53:12 martin 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
@@ -2007,6 +2007,33 @@ do_catpages()
 	return $failed
 }
 
+#
+#	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}
+}
+
 
 #
 #	ptyfsoldnodes

Reply via email to