From cc9e4b55e53dfd70e9e035818d476c7564d9ee20 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Wed, 18 Oct 2006 20:45:25 +0000 Subject: [PATCH] initial checkin --- debian/changelog | 6 ++++++ debian/compat | 1 + debian/control | 17 +++++++++++++++++ debian/copyright | 30 ++++++++++++++++++++++++++++++ debian/docs | 0 debian/files | 1 + debian/rules | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ grml-policy-rc.d | 28 ++++++++++++++++++++++++++++ grml-policy-rc.d.8 | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 9 files changed, 181 insertions(+) create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/docs create mode 100644 debian/files create mode 100755 debian/rules create mode 100755 grml-policy-rc.d create mode 100644 grml-policy-rc.d.8 diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..f467132 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,6 @@ +grml-policyrcd (0.1-1) unstable; urgency=low + + * Initial release. + + -- Michael Prokop Tue, 18 Jul 2006 19:26:40 +0200 + diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..7ed6ff8 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +5 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..e2b8847 --- /dev/null +++ b/debian/control @@ -0,0 +1,17 @@ +Source: grml-policyrcd +Section: admin +Priority: optional +Maintainer: Michael Prokop +Build-Depends: debhelper (>= 5) +Standards-Version: 3.7.2 + +Package: grml-policyrcd +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, policyrcd-script-zg2 +Conflicts: grml-scripts (<= 0.7-37) +Description: wrapper for and around invoke-rc.d and policyrcd-script-zg2 + grml-policy-rc.d is a wrapper script for invoke-rc.d to + avoid automatical startup of init scripts via invoke-rc.d. It + is designed to be used e.g. with policyrcd-script-zg2. To + configure it take a look at /etc/policy-rc.d.conf and + /etc/zg-policy-rc.d.conf and the manpage of grml-policy-rc.d. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..a391c00 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,30 @@ +This package was debianized by Michael Prokop on +Tue, 18 Jul 2006 19:26:40 +0200. + +It was downloaded from http://grml.org/repos/ + +Upstream Author: Michael Prokop + +Copyright: (c) 2006++ Michael Prokop + +License: + + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. + +The Debian packaging is (C) 2006, Michael Prokop and +is licensed under the GPL, see above. diff --git a/debian/docs b/debian/docs new file mode 100644 index 0000000..e69de29 diff --git a/debian/files b/debian/files new file mode 100644 index 0000000..d964f07 --- /dev/null +++ b/debian/files @@ -0,0 +1 @@ +grml-policyrcd_0.1-1_i386.deb admin optional diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..369df7c --- /dev/null +++ b/debian/rules @@ -0,0 +1,51 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + + +build: + +clean: + dh_testdir + dh_testroot + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs usr/sbin/ + + install -m 755 grml-policy-rc.d debian/grml-policyrcd/usr/sbin/grml-policy-rc.d + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installexamples + dh_installman grml-policy-rc.d.8 + dh_link + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install diff --git a/grml-policy-rc.d b/grml-policy-rc.d new file mode 100755 index 0000000..9e4340f --- /dev/null +++ b/grml-policy-rc.d @@ -0,0 +1,28 @@ +#!/bin/sh +# Filename: grml-policy-rc.d +# Purpose: interface script for invoke-rc.d (see /etc/policy-rc.d.conf) +# Authors: grml-team (grml.org), (c) Michael Prokop +# Bug-Reports: see http://grml.org/bugs/ +# License: This file is licensed under the GPL v2. +# Latest change: Mit Okt 18 20:43:22 UTC 2006 [mika] +################################################################################ + +# test for chroot +if test "$(/usr/bin/stat -c "%d/%i" /)" != "$(/usr/bin/stat -Lc "%d/%i" /proc/1/root 2>/dev/null)" ; then + # notify invoke-rc.d that nothing should be done -- we are in a chroot + exit 101 +fi + +# read configuration file +if [ -r /etc/policy-rc.d.conf ] ; then + . /etc/policy-rc.d.conf +fi + +if [ -n "$EXITSTATUS" ]; then + exit "$EXITSTATUS" +else + # allow it + exit 0 +fi + +## END OF FILE ################################################################# diff --git a/grml-policy-rc.d.8 b/grml-policy-rc.d.8 new file mode 100644 index 0000000..13e7d44 --- /dev/null +++ b/grml-policy-rc.d.8 @@ -0,0 +1,47 @@ +.\" Filename: grml-policy-rc.d.1 +.\" Purpose: man page for grml-policy-rc.d +.\" Authors: grml-team (grml.org), (c) Michael Prokop +.\" Bug-Reports: see http://grml.org/bugs/ +.\" License: This file is licensed under the GPL v2. +.\" Latest change: Die Jul 18 00:38:45 CEST 2006 [mika] +.\"############################################################################### + +.\"############################################################### +.TH grml\-policy-rc.d 8 "2006-07-18" "grml-policy-rc.d" +.SH "NAME" +grml\-policy\-rc.d \- wrapper for invoke-rc.d +.\"####################################################### + +.P +This is a wrapper script for invoke-rc.d to avoid automatical +startup of init scripts via invoke-rc.d. It is designed to be +used e.g. with policyrcd-script-zg2. To configure it take a look +at /etc/policy-rc.d.conf and /etc/zg-policy-rc.d.conf. + +First of all make sure the package policyrcd-script-zg2 +(which provides the /usr/sbin/policy-rc.d interface) is +installed. + +In policyrcd-script-zg2's configuration file named +/etc/zg-policy-rc.d.conf the script /usr/sbin/grml-policy-rc.d is +defined as the interface for handling invoke-rc.d's startup +policy. grml-policy-rc.d can be configure via +/etc/policy-rc.d.conf. + +By default you won't notice any differences to Debian's default +behaviour, except that invoke-rc.d won't be executed if a chroot +has been detected (detection: /proc is missing). If you want to +disable automatical startup of newly installed packages (done via +the invoke-rc.d mechanism) just set EXITSTATUS to '101' in +/etc/policy-rc.d.conf. To restore the default behaviour set +EXITSTATUS back to '0' in /etc/policy-rc.d.conf. + +.SH "BUGS" +Probably. Please report any bugs you find and report feedback and +suggestions to the grml-team. See http://grml.org/bugs/ for +further information. Thank you! + +.SH "COPYRIGHT" +Copyright \(co 2006 by the grml-team. +.\"###### END OF FILE ########################################################## +.\" vim:tw=60 -- 2.1.4