Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 07 Feb 2012 18:28:08 -0800
From:      Xin Li <delphij@delphij.net>
To:        freebsd-rc@FreeBSD.org
Cc:        d@delphij.net
Subject:   base system rc.d dependencies as of 231173
Message-ID:  <4F31DDB8.3020809@delphij.net>

next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------030707080703060506090202
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi,

This may be useful for rc.d people so I've decided to post it here.  I
created these graphs with the NetBSD rcorder-visualize script with
some changes to adapt with our needs (e.g. some scripts would provide
multiple services, etc, attached).  I think the script is useful for
FreeBSD as well, should we import it?

Generated graph can be found at:

	http://people.freebsd.org/~delphij/misc/rcorder-r231173.svg

Or,
	https://www.delphij.net/rcorder-r231173.svg

(people.freebsd.org would serve the .svg as a download).

Cheers,
- -- 
Xin LI <delphij@delphij.net>	https://www.delphij.net/
FreeBSD - The Power to Serve!		Live free or die
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (FreeBSD)

iQEcBAEBCAAGBQJPMd24AAoJEG80Jeu8UPuzflgIAKtj2mPkwQbdGRPV8ywBYLLa
faOacHpgJ0nmbLdfpjXFCx/gN4092MJ+xdYm8uOGH8H1S0ZjAE4NJSRdzpv8SGWE
I0hR0h2m9BvqxSJ5sPYHLSwJ32ro/DdlPrXYpYP0lzDt8eZjJpcCz2+5xQF1Iz/c
MX2jostyCDG5ShuT0R/FjT6UeWEdlHla1ZcBHZX+yYw7Lm5wij2rgLARG8v/qUj9
FvGzNVoGtEQpP5x2W1QYtX+dUaGxyN8yifGkOFKvuTZWwoaW77z0lGlsDrEEV15e
MCgatzlJIQRsF2zHZi15Gw8OYp60OgekpHrJvFIfespGIVwtXuu1MfGc2NQzE2c=
=xWxM
-----END PGP SIGNATURE-----

--------------030707080703060506090202
Content-Type: text/plain;
 name="rcorder-visualize.sh"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="rcorder-visualize.sh"

#!/bin/sh
# $NetBSD: rcorder-visualize.sh,v 1.5 2009/08/09 17:08:53 apb Exp $
#
# Written by Joerg Sonnenberger.  You may freely use and redistribute
# this script.
#
# Simple script to show the dependency graph for rc scripts.
# Output is in the dot(1) language and can be rendered using
#	sh rcorder-visualize | dot -T svg -o rcorder.svg
# dot(1) can be found in graphics/graphviz in pkgsrc.

rc_files=${*:-/etc/rc.d/*}

{
echo ' digraph {'
for f in $rc_files; do
< $f awk '
/# PROVIDE: /	{ for (i = 3; i <= NF; i++) provides[$i] = $i }
/# REQUIRE: /	{ for (i = 3; i <= NF; i++) requires[$i] = $i }
/# BEFORE: /	{ for (i = 3; i <= NF; i++) befores[$i] = $i }

END {
	for (provide in provides) {
		print "    \"" provide "\";"
			for (x in requires) print "    \"" x "\"->\"" provide "\";"
			for (x in befores) print "    \"" provide "\"->\"" x "\";"
	}
}
'
done
echo '}'
}

--------------030707080703060506090202--



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