Red Hat RPM - Problem with executing my own external script in the %install section

This is Interesting: Free IT Magazines  
Home > Archive > Red Hat RPM > January 2005 > Problem with executing my own external script in the %install section





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Problem with executing my own external script in the %install section
td98esj

2005-01-06, 6:35 am

Hi,

I am developing an rpm to be installed on several different linux-distributions.

In my rpm I have these files among others:
7.rc.a
7.rc.b
7.rc.c
rc.a
rc.b
rc.c

I have written my own script that checks for a specific version of sh-utils or if coreutils is installed.

If the version of sh-utils is older than a specific version, then my rpm must install the 7.*-files and rename them to rc.*.
The renaming is done in my script by using the move command.
Something like this below.
# mv 7.rc.a /installDIR/rc.a

My script is launched from within the %install-section in the spec-file. When i build the rpm using rpm -ba I notice that my script runs and also generates a log file, but when I install the rpm I get no output to my log file so I am not sure that my script is actually executed during installation of my rpm.

I dont want to have 2 different rpm:s just because some RH-systems have older version of sh-utils installed.

I would appreciate any solution to this problem.

/Best Regards Erik
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com