[Spacewalk-list] manage service run levels (chkconfig)

Waldirio Manhães Pinheiro waldirio at gmail.com
Mon Jan 26 12:27:18 UTC 2015


Hello Reneau

One easy way that you can do is according another post that I did

https://www.redhat.com/archives/spacewalk-list/2014-October/msg00144.html

Let me know if you have some doubt to implement.

###
#!/bin/bash
if [ -f /var/log/ref_teste ]; then
  echo "Script was defined - $(date)"           | tee -a /var/log/messages
  echo "Removing $0 from /etc/cron.hourly"      | tee -a /var/log/messages
  echo "### rm -rf /etc/cron.hourly/$0"         | tee -a /var/log/messages
else
  echo "TEST ### $(date) ###"                   | tee -a /var/log/messages

   <INSERT YOUR CODE HERE, for example chkconfig xpto on;service xpto start>

  touch /var/log/ref_teste
fi
###

Take Care

______________
Atenciosamente
Waldirio
msn: waldirio at gmail.com
Skype: waldirio
Site: www.waldirio.com.br
Blog: blog.waldirio.com.br
LinkedIn: http://br.linkedin.com/pub/waldirio-pinheiro/22/b21/646
PGP: www.waldirio.com.br/public.html

On Wed, Jan 21, 2015 at 3:49 PM, Reneau, Wes W [HDS] <
Wes.Reneau at hdsupply.com> wrote:

> I'm not installing the OS from spacewalk, yet.  I'm focusing primarily on
> getting current machines into spacewalk and managed.  I found that should I
> install a package from spacewalk I can manage its chkconfig levels by
> adding a remote command with package install but this is not an option from
> within the activation key. I'm running spacewalk 2.0.
>
> thx
>
> -----Original Message-----
> From: spacewalk-list-bounces at redhat.com [mailto:
> spacewalk-list-bounces at redhat.com] On Behalf Of Mattias Giese
> Sent: Wednesday, January 21, 2015 10:16 AM
> To: spacewalk-list at redhat.com
> Subject: Re: [Spacewalk-list] manage service run levels (chkconfig)
>
> Heya,
>
> On 21/01/15 14:59:18, Reneau, Wes W [HDS] wrote:
> > Hello all,
> >
> > Is it possible to manage the runlevels at which a service would start
> via spacewalk?  We have several hundred machines that we are adding to
> spacewalk (brand new installation of spacewalk) and we are adding some
> config files and rpms/services to each box via activation keys.  The
> problem is that by default services are configured off.  I can do it via
> remote commands and SSM but hoping I could manage this at registration.
> Help appreciated.
>
> Why not simply add these commands to the end of your bootstrap script?
> I normally customize the bootstrap so that the user may enable/disable
> his own post-registration tasks on demand.
>
> With a recent Spacewalk there is also a feature called 'Action Chains',
> where you could plan the package installation, configuration push and
> activation of needed services and schedule these actions in one go.
>
> Regards,
>
> Mattias
> --
> Mattias Giese
> System Management & Monitoring Architect
> B1 Systems GmbH
>
> _______________________________________________
> Spacewalk-list mailing list
> Spacewalk-list at redhat.com
> https://www.redhat.com/mailman/listinfo/spacewalk-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/spacewalk-list/attachments/20150126/71bcacf1/attachment.htm>


More information about the Spacewalk-list mailing list