Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Mar 2013 04:42:04 +0000 (UTC)
From:      Colin Percival <cperciva@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r248487 - head/etc/rc.d
Message-ID:  <201303190442.r2J4g4Js035824@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cperciva
Date: Tue Mar 19 04:42:04 2013
New Revision: 248487
URL: http://svnweb.freebsd.org/changeset/base/248487

Log:
  If dumpdev is AUTO but no dump device has been set -- i.e., there is no swap
  space configured for rc.d/dumpon to designate for dumping -- then exit
  silently rather than with a
  > realpath: /dev/dumpdev: No such file or directory
  error message.
  
  An argument could be made that we should print a (more informative) warning
  message; but given that under the same conditions the rc.d/dumpon script will
  already print a
  > No suitable dump device was found
  warning, it seems that printing an additional
  > Dump device does not exist.  Savecore not run.
  warning would be superfluous.

Modified:
  head/etc/rc.d/savecore

Modified: head/etc/rc.d/savecore
==============================================================================
--- head/etc/rc.d/savecore	Tue Mar 19 00:39:02 2013	(r248486)
+++ head/etc/rc.d/savecore	Tue Mar 19 04:42:04 2013	(r248487)
@@ -23,6 +23,9 @@ savecore_prestart()
 		return 1
 		;;
 	[Aa][Uu][Tt][Oo])
+		if [ ! -L /bin/realpath ]; then
+			return 1
+		fi
 		dumpdev=`/bin/realpath /dev/dumpdev`
 		;;
 	esac



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201303190442.r2J4g4Js035824>