From owner-freebsd-rc@FreeBSD.ORG Wed Feb 8 02:28:11 2012 Return-Path: Delivered-To: freebsd-rc@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5E7F106567E for ; Wed, 8 Feb 2012 02:28:11 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from anubis.delphij.net (anubis.delphij.net [IPv6:2001:470:1:117::25]) by mx1.freebsd.org (Postfix) with ESMTP id CB5568FC1B for ; Wed, 8 Feb 2012 02:28:11 +0000 (UTC) Received: from delta.delphij.net (drawbridge.ixsystems.com [206.40.55.65]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by anubis.delphij.net (Postfix) with ESMTPSA id 97A6B5EAF; Tue, 7 Feb 2012 18:28:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=delphij.net; s=anubis; t=1328668091; bh=fUCZmwvaDJwbFpxFtBvwEKmFO8JeA/8MJ+WAjD4Alvs=; h=Message-ID:Date:From:Reply-To:MIME-Version:To:CC:Subject: Content-Type; b=q7fBU5ludYGTX5v2cb2+kc7Gj3tnIBe/FHAVhWVfMUgPFrG4OBKA8RMtrUBbJg57l Ij6ygMcGaxgG9vPInW8TqO9gCLCprJha3MTbwbwTXoDa8GsimECnH3YUK8yq8lQyUC ElqrHnflNobrI+3bwGg49L+uW5yFGOR8FfBy5OBk= Message-ID: <4F31DDB8.3020809@delphij.net> Date: Tue, 07 Feb 2012 18:28:08 -0800 From: Xin Li Organization: The FreeBSD Project MIME-Version: 1.0 To: freebsd-rc@FreeBSD.org X-Enigmail-Version: 1.3.5 Content-Type: multipart/mixed; boundary="------------030707080703060506090202" Cc: d@delphij.net Subject: base system rc.d dependencies as of 231173 X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Feb 2012 02:28:12 -0000 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 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--