Date: Thu, 30 May 2019 15:17:35 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r348427 - stable/12/sbin/dumpon Message-ID: <201905301517.x4UFHZjD025450@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Thu May 30 15:17:35 2019 New Revision: 348427 URL: https://svnweb.freebsd.org/changeset/base/348427 Log: MFC r348082: Provide an example of using dhclient-script(5) to configure netdump. Modified: stable/12/sbin/dumpon/dumpon.8 Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/dumpon/dumpon.8 ============================================================================== --- stable/12/sbin/dumpon/dumpon.8 Thu May 30 15:15:47 2019 (r348426) +++ stable/12/sbin/dumpon/dumpon.8 Thu May 30 15:17:35 2019 (r348427) @@ -28,7 +28,7 @@ .\" From: @(#)swapon.8 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd November 17, 2018 +.Dd May 21, 2019 .Dt DUMPON 8 .Os .Sh NAME @@ -283,6 +283,49 @@ Note that the live kernel might be at a different path which can be examined by looking at the .Va kern.bootfile .Xr sysctl 8 . +.Pp +The +.Nm +.Xr rc 8 +script runs early during boot, typically before networking is configured. +This makes it unsuitable for configuring +.Xr netdump +when the client address is dynamic. +To configure +.Xr netdump +when +.Xr dhclient +binds to a server, +.Xr dhclient-script +can be used to run +.Xr dumpon . +For example, to automatically configure +.Xr netdump +on the vtnet0 interface, add the following to +.Pa /etc/dhclient-exit-hooks . +.Bd -literal +case $reason in +BOUND|REBIND|REBOOT|RENEW) + if [ "$interface" != vtnet0 ] || [ -n "$old_ip_address" -a \\ + "$old_ip_address" = "$new_ip_address" ]; then + break + fi + if [ -n "$new_routers" ]; then + # Take the first router in the list. + gateway_flag="-g ${new_routers%% *}" + fi + dumpon -c $new_ip_address -s $server $gateway_flag vtnet0 + ;; +esac +.Ed +.Pp +Be sure to fill in the server IP address and change the interface name if +needed, and to configure +.Pp +.Dl dumpdev="NO" +.Pp +in +.Pa /etc/rc.conf . .Sh SEE ALSO .Xr gzip 1 , .Xr kgdb 1 ,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905301517.x4UFHZjD025450>