RE: Installing RPMs via kickstart vs. installing on existing serv er

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I appreciate the replies to my question.  What I was concerned about was
having RPMs that might contain a %post or a %triggerin that stops and starts
a service and if that service being stopped could potentially screw
something up during a kickstart.  In particular, we have created some
"config" rpms that contain custom conf files that get copied to their final
destination via a %post or %triggerin script.  For instance, the "config"
RPM might install a customized version of /etc/syslog.conf in some
customized directory and then, during a %triggerin script, stop the syslog
service, copy the customized syslog.conf to /etc/syslog.conf and then
restart the service.  During a kickstart, I think that it will be fine to
stop and then restart syslog, but what if some day we apply this logic to a
service that shouldn't be stopped during a kickstart?  I am not sure what
that service might be, but I should probably adopt better scripting
standards now before I might run into problems...

Thanks for your help,

Ben Piela

-----Original Message-----
From: James Olin Oden [mailto:joden@xxxxxxxxxxxxx] 
Sent: Wednesday, April 21, 2004 10:49 AM
To: RPM Package Manager
Subject: Re: Installing RPMs via kickstart vs. installing on existing server

On Wed, 21 Apr 2004, Troy Dawson wrote:

> Piela, Ben wrote:
> > Hello all,
> > 
> > Is there a way within a spec file to distinguish whether or not your RPM
is
> > being installed via a kickstart or is it being installed on an existing
> > server?  Perhaps you can write some scriptlet that will act one way
during
> > an installation via kickstart and another way during a manual
installation
> > on an existing server...
> > 
> > Thanks very much,
> > 
> > Ben Piela
> > 
> 
> I don't know why you would want to do this, but you probrubly have your 
> reasons.  The only reason I can think of is that your rpm doesn't install 
> correctly during a kickstart (or install) versus a regular install.  There
are 
> usually other tricks to make it work right.
> 
> BUT ... just incase there is some legitimate reason, I had done something 
> similar.  Basically, I wanted a different script to be installed if a rpm
was 
> installed via YUM versus if it was installed any other way.  The technique
I 
> used should work.
> 
> Basically, just find something unique that you would be able to see during
an 
> install, that you wouldn't see after the machine was up.  In your %pre,
%post 
> or whichever script, do a check for that thing, then if you see that thing
run 
> your 'kickstart' commands, and if you don't, run your 'normal' commands.
>
And one way to force that "thing" to be always available to check is to 
touch a file in your kickstart %pre, and remove it in your kickstart 
%post.

Cheers...james 





Please do not transmit orders or instructions regarding a UBS account by
email. The information provided in this email or any attachments is not an
official transaction confirmation or account statement. For your protection,
do not include account numbers, Social Security numbers, credit card
numbers, passwords or other non-public information in your email. Because
the information contained in this message may be privileged, confidential,
proprietary or otherwise protected from disclosure, please notify us
immediately by replying to this message and deleting it from your computer
if you have received this communication in error.  Thank you.

UBS Financial Services Inc.
UBS International Inc.


_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux