socsvn commit: r294581 - in soc2013/def/crashdump-head/etc: defaults rc.d

def at FreeBSD.org def at FreeBSD.org
Mon Nov 30 21:19:18 UTC 2015


Author: def
Date: Mon Nov 30 21:19:16 2015
New Revision: 294581
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=294581

Log:
  Use dumppubkey variable for public key.

Modified:
  soc2013/def/crashdump-head/etc/defaults/rc.conf
  soc2013/def/crashdump-head/etc/rc.d/dumpon

Modified: soc2013/def/crashdump-head/etc/defaults/rc.conf
==============================================================================
--- soc2013/def/crashdump-head/etc/defaults/rc.conf	Mon Nov 30 19:16:58 2015	(r294580)
+++ soc2013/def/crashdump-head/etc/defaults/rc.conf	Mon Nov 30 21:19:16 2015	(r294581)
@@ -589,6 +589,7 @@
 chkprintcap_flags="-d"	# Create missing directories by default.
 dumpdev="AUTO"		# Device to crashdump to (device name, AUTO, or NO).
 dumpdir="/var/crash"	# Directory where crash dumps are to be stored
+dumppubkey=""		# Public key for encrypted kernel crash dumps.
 savecore_flags="-m 10"	# Used if dumpdev is enabled above, and present.
 			# By default, only the 10 most recent kernel dumps
 			# are saved.

Modified: soc2013/def/crashdump-head/etc/rc.d/dumpon
==============================================================================
--- soc2013/def/crashdump-head/etc/rc.d/dumpon	Mon Nov 30 19:16:58 2015	(r294580)
+++ soc2013/def/crashdump-head/etc/rc.d/dumpon	Mon Nov 30 21:19:16 2015	(r294581)
@@ -16,7 +16,12 @@
 
 dumpon_try()
 {
-	if /sbin/dumpon ${dumpon_flags} "${1}" ; then
+	if [ -n "${dumppubkey}" ]; then
+		/sbin/dumpon -k "${dumppubkey}" "${1}"
+	else
+		/sbin/dumpon "${1}"
+	fi
+	if [ $? -eq 0 ]; then
 		# Make a symlink in devfs for savecore
 		ln -fs "${1}" /dev/dumpdev
 		return 0


More information about the svn-soc-all mailing list