summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/appendix/files/mysql.txt2
-rw-r--r--doc/getting_started/index.txt2
-rw-r--r--doc/server/plugins/structures/bundler/kernel.txt2
-rw-r--r--schemas/bundle.xsd9
-rw-r--r--schemas/rules.xsd13
-rw-r--r--src/lib/Bcfg2/Client/Tools/Action.py19
-rw-r--r--src/lib/Bcfg2/Server/Admin/Compare.py3
7 files changed, 6 insertions, 44 deletions
diff --git a/doc/appendix/files/mysql.txt b/doc/appendix/files/mysql.txt
index 81104ec17..6c6c83e3e 100644
--- a/doc/appendix/files/mysql.txt
+++ b/doc/appendix/files/mysql.txt
@@ -17,7 +17,7 @@ I added a new bundle:
<Bundle name="mysql-server" version="3.0">
<Path name="/root/bcfg2-install/mysql/users.sh"/>
<Path name="/root/bcfg2-install/mysql/users.sql"/>
- <PostInstall name="/root/bcfg2-install/mysql/users.sh"/>
+ <Action name="mysql_users"/>
<Package name="mysql-server-4.1"/>
<Service name="mysql"/>
</Bundle>
diff --git a/doc/getting_started/index.txt b/doc/getting_started/index.txt
index a9e91e6b8..dde9bb4e4 100644
--- a/doc/getting_started/index.txt
+++ b/doc/getting_started/index.txt
@@ -205,7 +205,7 @@ real ``/etc/motd`` file to that location, run the client again, and
you will find that we now have a correct entry::
Loaded tool drivers:
- Chkconfig POSIX PostInstall RPM
+ Chkconfig POSIX Action RPM
Phase: initial
Correct entries: 1
diff --git a/doc/server/plugins/structures/bundler/kernel.txt b/doc/server/plugins/structures/bundler/kernel.txt
index 2e3d84e93..c6aa5e3f3 100644
--- a/doc/server/plugins/structures/bundler/kernel.txt
+++ b/doc/server/plugins/structures/bundler/kernel.txt
@@ -30,7 +30,7 @@ some of which might be better than this one. Feel free to hack as needed.
<Path name='/boot/initrd'/>
<Path name='/boot/vmlinuz.old'/>
<Path name='/boot/initrd.old'/>
- <PostInstall name='/sbin/lilo'/>
+ <Action name='lilo'/>
<!-- Current kernel -->
<Package name='linux-2.4.21-314.tg1'/>
<Package name='linux-2.4.21-314.tg1-source'/>
diff --git a/schemas/bundle.xsd b/schemas/bundle.xsd
index 68e793920..81bb9f0b5 100644
--- a/schemas/bundle.xsd
+++ b/schemas/bundle.xsd
@@ -80,15 +80,6 @@
</xsd:documentation>
</xsd:annotation>
</xsd:element>
- <xsd:element name='PostInstall' type='StructureEntry'>
- <xsd:annotation>
- <xsd:documentation>
- PostInstall entries are deprecated in favor of Action
- entries. Actions can do everything PostInstall entries can
- do and more.
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
<xsd:element name='BoundPackage' type='PackageType'>
<xsd:annotation>
<xsd:documentation>
diff --git a/schemas/rules.xsd b/schemas/rules.xsd
index ddfb7ad0d..be60abef0 100644
--- a/schemas/rules.xsd
+++ b/schemas/rules.xsd
@@ -13,10 +13,6 @@
<xsd:import namespace="http://genshi.edgewall.org/"
schemaLocation="genshi.xsd"/>
- <xsd:complexType name='PostInstallType'>
- <xsd:attribute type='xsd:string' name='name' use='required'/>
- </xsd:complexType>
-
<xsd:group name="rulesElements">
<xsd:choice>
<xsd:group ref="py:genshiElements"/>
@@ -126,15 +122,6 @@
</xsd:documentation>
</xsd:annotation>
</xsd:element>
- <xsd:element name='PostInstall' type='PostInstallType'>
- <xsd:annotation>
- <xsd:documentation>
- PostInstall entries are deprecated in favor of Action
- entries. Actions can do everything PostInstall entries can
- do and more.
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
<xsd:element name='Group' type='RContainerType'>
<xsd:annotation>
<xsd:documentation>
diff --git a/src/lib/Bcfg2/Client/Tools/Action.py b/src/lib/Bcfg2/Client/Tools/Action.py
index b1a897c81..5aada9c0b 100644
--- a/src/lib/Bcfg2/Client/Tools/Action.py
+++ b/src/lib/Bcfg2/Client/Tools/Action.py
@@ -11,9 +11,8 @@ from Bcfg2.Compat import input # pylint: disable=W0622
class Action(Bcfg2.Client.Tools.Tool):
"""Implement Actions"""
name = 'Action'
- __handles__ = [('PostInstall', None), ('Action', None)]
- __req__ = {'PostInstall': ['name'],
- 'Action': ['name', 'timing', 'when', 'command', 'status']}
+ __handles__ = [('Action', None)]
+ __req__ = {'Action': ['name', 'timing', 'when', 'command', 'status']}
def _action_allowed(self, action):
""" Return true if the given action is allowed to be run by
@@ -66,28 +65,14 @@ class Action(Bcfg2.Client.Tools.Tool):
"""Actions always verify true."""
return True
- def VerifyPostInstall(self, dummy, _):
- """Actions always verify true."""
- return True
-
def InstallAction(self, entry):
"""Run actions as pre-checks for bundle installation."""
if entry.get('timing') != 'post':
return self.RunAction(entry)
return True
- def InstallPostInstall(self, entry):
- """ Install a deprecated PostInstall entry """
- self.logger.warning("Installing deprecated PostInstall entry %s" %
- entry.get("name"))
- return self.InstallAction(entry)
-
def BundleUpdated(self, bundle, states):
"""Run postinstalls when bundles have been updated."""
- for postinst in bundle.findall("PostInstall"):
- if not self._action_allowed(postinst):
- continue
- self.cmd.run(postinst.get('name'))
for action in bundle.findall("Action"):
if action.get('timing') in ['post', 'both']:
if not self._action_allowed(action):
diff --git a/src/lib/Bcfg2/Server/Admin/Compare.py b/src/lib/Bcfg2/Server/Admin/Compare.py
index 820271a2f..8214f9e71 100644
--- a/src/lib/Bcfg2/Server/Admin/Compare.py
+++ b/src/lib/Bcfg2/Server/Admin/Compare.py
@@ -22,8 +22,7 @@ class Compare(Bcfg2.Server.Admin.Mode):
'Service': ['name', 'type', 'status', 'mode',
'target', 'sequence', 'parameters'],
'Action': ['name', 'timing', 'when', 'status',
- 'command'],
- 'PostInstall': ['name']
+ 'command']
}
def compareStructures(self, new, old):