summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2014-06-16 20:14:20 +1000
committerMartin Schwenke <martin@meltin.net>2014-06-17 11:23:01 +1000
commit5971385948588835dd9cde4d9f7d63fd7f06aa5a (patch)
tree9d13b8094840050dabdf7c3c5824fd43df0739b1
parent6a6a6d44505c612c3bbd32e107a6da98e52a3290 (diff)
downloadautocluster-5971385948588835dd9cde4d9f7d63fd7f06aa5a.tar.gz
autocluster-5971385948588835dd9cde4d9f7d63fd7f06aa5a.tar.xz
autocluster-5971385948588835dd9cde4d9f7d63fd7f06aa5a.zip
Move service enable/disable in kickstart to per-RHEL config file
Signed-off-by: Martin Schwenke <martin@meltin.net>
-rw-r--r--config.d/00base.defconf11
-rw-r--r--templates/RHEL5.services32
-rw-r--r--templates/RHEL6.services32
-rw-r--r--templates/nas-kickstart.cfg33
4 files changed, 76 insertions, 32 deletions
diff --git a/config.d/00base.defconf b/config.d/00base.defconf
index e5530ad..ee750ff 100644
--- a/config.d/00base.defconf
+++ b/config.d/00base.defconf
@@ -411,6 +411,11 @@ rhel_get_packages ()
echo "$installdir/templates/RHEL${RHEL_VERSION%%.*}.packages"
}
+rhel_get_services ()
+{
+ echo "$installdir/templates/RHEL${RHEL_VERSION%%.*}.services"
+}
+
rhel_post_config_hook ()
{
if [ "$ISO" = "@uto" ] ; then
@@ -436,6 +441,10 @@ rhel_post_config_hook ()
if [ "$RHEL_PACKAGES" = "@uto" ] ; then
RHEL_PACKAGES=$(rhel_get_packages) || exit $?
fi
+
+ if [ "$RHEL_SERVICES" = "@uto" ] ; then
+ RHEL_SERVICES=$(rhel_get_services) || exit $?
+ fi
}
register_hook post_config_hooks rhel_post_config_hook
@@ -448,6 +457,8 @@ defconf RHEL_VERSION "6.2" \
defconf RHEL_PACKAGES "@uto"
+defconf RHEL_SERVICES "@uto"
+
defconf ISO_DIR "/virtual/ISO" \
"<dir>" "directory for ISO images, prepended to $ISO if not absolute"
diff --git a/templates/RHEL5.services b/templates/RHEL5.services
new file mode 100644
index 0000000..a02f91e
--- /dev/null
+++ b/templates/RHEL5.services
@@ -0,0 +1,32 @@
+echo "Turn off some services..."
+chkconfig atd off
+chkconfig avahi-daemon off
+chkconfig avahi-dnsconfd off
+chkconfig bluetooth off
+chkconfig cpuspeed off
+chkconfig cups off
+chkconfig dhcdbd off
+chkconfig dund off
+chkconfig firstboot off
+chkconfig haldaemon off
+chkconfig hidd off
+chkconfig ip6tables off
+chkconfig ipmi off
+chkconfig iptables off
+chkconfig irda off
+chkconfig kudzu off
+chkconfig nfslock off
+chkconfig nscd off
+chkconfig pand off
+chkconfig pcscd off
+chkconfig restorecond off
+chkconfig rhnsd off
+chkconfig sendmail off
+chkconfig setroubleshoot off
+chkconfig smartd off
+chkconfig xfs off
+chkconfig yum-updatesd off
+chkconfig gpm off
+
+echo "Turn on some services..."
+chkconfig multipathd on
diff --git a/templates/RHEL6.services b/templates/RHEL6.services
new file mode 100644
index 0000000..a02f91e
--- /dev/null
+++ b/templates/RHEL6.services
@@ -0,0 +1,32 @@
+echo "Turn off some services..."
+chkconfig atd off
+chkconfig avahi-daemon off
+chkconfig avahi-dnsconfd off
+chkconfig bluetooth off
+chkconfig cpuspeed off
+chkconfig cups off
+chkconfig dhcdbd off
+chkconfig dund off
+chkconfig firstboot off
+chkconfig haldaemon off
+chkconfig hidd off
+chkconfig ip6tables off
+chkconfig ipmi off
+chkconfig iptables off
+chkconfig irda off
+chkconfig kudzu off
+chkconfig nfslock off
+chkconfig nscd off
+chkconfig pand off
+chkconfig pcscd off
+chkconfig restorecond off
+chkconfig rhnsd off
+chkconfig sendmail off
+chkconfig setroubleshoot off
+chkconfig smartd off
+chkconfig xfs off
+chkconfig yum-updatesd off
+chkconfig gpm off
+
+echo "Turn on some services..."
+chkconfig multipathd on
diff --git a/templates/nas-kickstart.cfg b/templates/nas-kickstart.cfg
index 2ac1534..8f8ecd8 100644
--- a/templates/nas-kickstart.cfg
+++ b/templates/nas-kickstart.cfg
@@ -45,38 +45,7 @@ part swap --ondisk=@@SYSTEM_DISK_PREFIX@@a --size=@@SWAPSIZE@@
(
set -x
-echo "Turn off some services..."
-chkconfig atd off
-chkconfig avahi-daemon off
-chkconfig avahi-dnsconfd off
-chkconfig bluetooth off
-chkconfig cpuspeed off
-chkconfig cups off
-chkconfig dhcdbd off
-chkconfig dund off
-chkconfig firstboot off
-chkconfig haldaemon off
-chkconfig hidd off
-chkconfig ip6tables off
-chkconfig ipmi off
-chkconfig iptables off
-chkconfig irda off
-chkconfig kudzu off
-chkconfig nfslock off
-chkconfig nscd off
-chkconfig pand off
-chkconfig pcscd off
-chkconfig restorecond off
-chkconfig rhnsd off
-chkconfig sendmail off
-chkconfig setroubleshoot off
-chkconfig smartd off
-chkconfig xfs off
-chkconfig yum-updatesd off
-chkconfig gpm off
-
-echo "Turn on some services..."
-chkconfig multipathd on
+@@@RHEL_SERVICES@@@
for i in @@EXTRA_CHKCONFIGS@@ ; do
chkconfig ${i%:*} ${i#*:}