bug fix for puppet kit

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.8@15820 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
linggao 2013-04-03 20:40:49 +00:00
parent af9428ed10
commit 8a53557d7d
5 changed files with 58 additions and 16 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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