[Lunar-commits] <lunar> remove initd plugin - it lives under sysvinit now.
Auke Kok
sofar at foo-projects.org
Sun Jun 24 07:00:15 CEST 2012
commit 11b7448eaa2adbab659a4e11c3bf3e9dffadadb2
Author: Auke Kok <sofar at foo-projects.org>
Date: Sat Jun 23 21:59:37 2012 -0700
remove initd plugin - it lives under sysvinit now.
---
plugins/initd.plugin | 88 --------------------------------------------------
1 file changed, 88 deletions(-)
diff --git a/plugins/initd.plugin b/plugins/initd.plugin
deleted file mode 100644
index 0364213..0000000
--- a/plugins/initd.plugin
+++ /dev/null
@@ -1,88 +0,0 @@
-#!/bin/bash
-#############################################################
-# #
-# initd.plugin - handling of initd.d files #
-# #
-#############################################################
-# #
-# Copyright 2005 by Auke Kok under GPLv2 #
-# #
-#############################################################
-
-
-plugin_initd_configure()
-{
- local SCRIPTS INITDSCRIPTS INSTALLED_INITDSCRIPTS
- debug_msg "plugin_initd_configure ($@)"
- if ! grep -q INITDSCRIPTS $DEPENDS_CONFIG/$MODULE &&
- [ -d $SCRIPT_DIRECTORY/init.d ]; then
- cd $SCRIPT_DIRECTORY/init.d
-
- SCRIPTS=$(ls -1)
- INITDSCRIPTS=$(grep -l "# chkconfig: " $SCRIPTS | cut -d/ -f2)
-
- for INITDSCRIPT in $INITDSCRIPTS; do
- if query "Invoke $INITDSCRIPT via init.d automatically at boot ?" y
- then
- INSTALLED_INIDSCRIPTS=$(echo $INSTALLED_INIDSCRIPTS $INITDSCRIPT)
- else
- if [ -f /etc/init.d/$INITDSCRIPT ]; then
- chkconfig --del $INITDSCRIPT
- ls /etc/rc?.d/???$INITDSCRIPT > /dev/null 2>&1 &&
- rm -f /etc/rc?.d/???$INITDSCRIPT
- fi
- fi
- done
- cd $SCRIPT_DIRECTORY
-
- set_module_config "INITDSCRIPTS" "$INSTALLED_INIDSCRIPTS"
- fi
- return 2
-}
-
-
-plugin_initd_post_build()
-{
- local SCRIPTS ALL_INITDSCRIPTS CHKCONFIG
- debug_msg "plugin_initd_post_build ($@)"
- [ -d /etc/init.d ] || mkdir -p /etc/init.d
-
- if [ -d $SCRIPT_DIRECTORY/init.d ]; then
- invoke_installwatch
- verbose_msg "handling init.d scripts" | tee -a $C_LOG
- cd $SCRIPT_DIRECTORY/init.d
- SCRIPTS=$(ls -1)
- ALL_INITDSCRIPTS=$(grep -l "# chkconfig: " $SCRIPTS | cut -d/ -f2)
-
- for INITDSCRIPT in $ALL_INITDSCRIPTS; do
- if [ ! -f /etc/init.d/$INITDSCRIPT ] ; then
- /usr/bin/install -g 0 -o 0 -m 700 $SCRIPT_DIRECTORY/init.d/$INITDSCRIPT /etc/init.d/
- fi
- done
- cd $SCRIPT_DIRECTORY
- devoke_installwatch
- fi
-
- for INITDSCRIPT in $INITDSCRIPTS; do
- ls /etc/rc?.d/???$INITDSCRIPT > /dev/null 2>&1 &&
- rm -f /etc/rc?.d/???$INITDSCRIPT
- invoke_installwatch
- chkconfig --add $INITDSCRIPT
- devoke_installwatch
-
- CHKCONFIG=`grep '^# chkconfig:' /etc/init.d/$INITDSCRIPT | cut -d : -f 2-2`
- if `echo $CHKCONFIG | grep -q $(/sbin/runlevel | cut -d ' ' -f 2-2) -`
- then
- if [ "${LUNAR_RESTART_SERVICES:=on}" == "on" ]; then
- ( cd / && /etc/init.d/$INITDSCRIPT stop )
- ( cd / && /etc/init.d/$INITDSCRIPT start )
- fi
- fi
-
- done
- return 2
-}
-
-
-plugin_register BUILD_CONFIGURE plugin_initd_configure
-plugin_register BUILD_POST_BUILD plugin_initd_post_build
More information about the Lunar-commits
mailing list