diff --git a/xCAT-buildkit/share/xcat/kits/kit_build/puppet/puppet-x86_64/buildkit.conf b/xCAT-buildkit/share/xcat/kits/kit_build/puppet/puppet-x86_64/buildkit.conf index 767ef0f5f..8c646f455 100644 --- a/xCAT-buildkit/share/xcat/kits/kit_build/puppet/puppet-x86_64/buildkit.conf +++ b/xCAT-buildkit/share/xcat/kits/kit_build/puppet/puppet-x86_64/buildkit.conf @@ -119,7 +119,7 @@ kitcomponent: serverroles=servicenode,compute kitrepoid=rhels6_x86_64 kitpkgdeps=puppet - postinstall=client.post + postinstall=client.rpm_post postbootscripts=client.post kitcomponent: @@ -130,7 +130,7 @@ kitcomponent: serverroles=mgtnode kitrepoid=rhels6_x86_64 kitpkgdeps=puppet-server - postinstall=server.post + postinstall=server.rpm_post postbootscripts=server.post diff --git a/xCAT-buildkit/share/xcat/kits/kit_build/puppet/puppet-x86_64/scripts/client.post b/xCAT-buildkit/share/xcat/kits/kit_build/puppet/puppet-x86_64/scripts/client.post index 460c0b730..bdec2334a 100755 --- a/xCAT-buildkit/share/xcat/kits/kit_build/puppet/puppet-x86_64/scripts/client.post +++ b/xCAT-buildkit/share/xcat/kits/kit_build/puppet/puppet-x86_64/scripts/client.post @@ -5,7 +5,7 @@ #------------------------------------------------------------------------------- #=head1 client.post #=head2 This command configures the puppet client on a xCAT node. It is used -# as a post installation script for puppet_client_kit.rpm. +# as a postbootscript for puppet kit. #=cut #------------------------------------------------------------------------------- if [ "$NODESETSTATE" = "install" ]; then @@ -13,10 +13,8 @@ if [ "$NODESETSTATE" = "install" ]; then #because the function will be called in the rpm %post section instead exit 0 else - if [ -f "/proc/cmdline" ]; then # prevent running it during install into chroot image - #configure the puppet agent configuration files - /xcatpost/config_puppet_client "$@" - fi + #configure the puppet agent configuration files + /xcatpost/config_puppet_client "$@" fi exit 0 diff --git a/xCAT-buildkit/share/xcat/kits/kit_build/puppet/puppet-x86_64/scripts/client.rpm_post b/xCAT-buildkit/share/xcat/kits/kit_build/puppet/puppet-x86_64/scripts/client.rpm_post new file mode 100755 index 000000000..e6c12c2df --- /dev/null +++ b/xCAT-buildkit/share/xcat/kits/kit_build/puppet/puppet-x86_64/scripts/client.rpm_post @@ -0,0 +1,23 @@ +#!/bin/sh +# IBM(c) 2013 EPL license http://www.eclipse.org/legal/epl-v10.html + + +#------------------------------------------------------------------------------- +#=head1 client.rpm_post +#=head2 This command configures the puppet client on a xCAT node. It is used +# as a post installation script for puppet_client_kit.rpm. +#=cut +#------------------------------------------------------------------------------- + +if [ -f "/proc/cmdline" ]; then # prevent running it during install into chroot image + #configure the puppet agent configuration files + /xcatpost/config_puppet_client "$@" +fi + +exit 0 + + + + + + diff --git a/xCAT-buildkit/share/xcat/kits/kit_build/puppet/puppet-x86_64/scripts/server.post b/xCAT-buildkit/share/xcat/kits/kit_build/puppet/puppet-x86_64/scripts/server.post index 881aabd54..b253cf331 100755 --- a/xCAT-buildkit/share/xcat/kits/kit_build/puppet/puppet-x86_64/scripts/server.post +++ b/xCAT-buildkit/share/xcat/kits/kit_build/puppet/puppet-x86_64/scripts/server.post @@ -5,7 +5,7 @@ #------------------------------------------------------------------------------- #=head1 server.post #=head2 This command configures the puppet server on a xCAT server or node. -# It is used as a post install script for puppet_server_kit.rpm +# It is used as a postbootscript for puppet kit. #=cut #------------------------------------------------------------------------------- if [ "$NODESETSTATE" = "install" ]; then @@ -13,15 +13,13 @@ if [ "$NODESETSTATE" = "install" ]; then #because the function will be called in the rpm %post section instead exit 0 else - if [ -f "/proc/cmdline" ]; then # prevent running it during install into chroot image - #Now configure the pupper server - /xcatpost/config_puppet_server "$@" + #Now configure the pupper server + /xcatpost/config_puppet_server "$@" - #restart puppet master - service puppetmaster stop - kill $(ps auxww | grep puppet | grep master | grep -v grep | awk '{print $2}') - service puppetmaster start - fi + #restart puppet master + service puppetmaster stop + kill $(ps auxww | grep puppet | grep master | grep -v grep | awk '{print $2}') + service puppetmaster start fi exit 0 diff --git a/xCAT-buildkit/share/xcat/kits/kit_build/puppet/puppet-x86_64/scripts/server.rpm_post b/xCAT-buildkit/share/xcat/kits/kit_build/puppet/puppet-x86_64/scripts/server.rpm_post new file mode 100755 index 000000000..7e2e81899 --- /dev/null +++ b/xCAT-buildkit/share/xcat/kits/kit_build/puppet/puppet-x86_64/scripts/server.rpm_post @@ -0,0 +1,23 @@ +#!/bin/sh +# IBM(c) 2013 EPL license http://www.eclipse.org/legal/epl-v10.html + + +#------------------------------------------------------------------------------- +#=head1 server.rpm_post +#=head2 This command configures the puppet server on a xCAT server or node. +# It is used as a post install script for puppet_server_kit.rpm +#=cut +#------------------------------------------------------------------------------- + +if [ -f "/proc/cmdline" ]; then # prevent running it during install into chroot image + #Now configure the pupper server + /xcatpost/config_puppet_server "$@" + + #restart puppet master + service puppetmaster stop + kill $(ps auxww | grep puppet | grep master | grep -v grep | awk '{print $2}') + service puppetmaster start +fi + +exit 0 +