LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: 答???: a problem about installing ipvsadm-1.21-9

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: 答???: a problem about installing ipvsadm-1.21-9
From: Horms <horms@xxxxxxxxxxxx>
Date: Tue, 8 Jun 2004 20:02:47 +0900
On Mon, Jun 07, 2004 at 08:03:42PM +0800, lu.peng wrote:
> The problem still exists:
> this is in my test environment:
> 1) i recompile my kernel to support LVS (Trustix , kernel is 2.4.26, )
> 2) use "rpmbuild --rebuild ipvsadm-1.21-9.src.rpm" , there's no error , the 
> result is creating ipvsadm-1.21-9.i586.rpm.
> 3) i try to install it like that:
> -----------------------------------------------------------------------
>  root@Test_Node9 /usr/src/trustix/rpms/i586# rpm -Uvh ipvsadm-1.21-9.i586.rpm 
> Preparing...                ########################################### [100%]
>    1:ipvsadm                ########################################### [100%]
> error reading information on service ipvsadm: No such file or directory
> error: execution of %post scriptlet from ipvsadm-1.21-9 failed, exit status 1
> ------------------------------------------------------------------------

As the error message indicates, the script in the %post section of
the rpm failed. To cut the chase it looks like this in the .spec file

----
/sbin/chkconfig --add ipvsadm
----

Most lilely the rpm installed the init script into a place other than
what your system expects.

Looking at the .spec file it is, by default installed
into /etc/rc.d/init.d/ipvsadm, which has been the wrong place
for quite some time now.

Wensong, can you change this to /etc/init.d/ipvsadm,
that seems like a much more sensible default.

Lu, there are a copule of ways to fix/get around this.
Probably the easiest is to edit the .spec file and change 
"%config /etc/rc.d/init.d/ipvsadm" to "%config /etc/rc.d/ipvsadm"
Then rebuild the binary _using the updated .spec file_!

Alternatively, I believe you can get rpm to skip running the
scripts. This should be pretty safe. Once ipvsadm is installed
you can manually move /etc/rc.d/init.d/ipvsadm to /etc/rc.d/ipvsadm,
then run /sbin/chkconfig --add ipvsadm

Actually, come to think of it you may not even need the init script,
unless you want to use it (and not some other method) to initialise
LVS at boot. If you don't need it, then just get rpm to install
ipvsadm without running the scripts, and that should be the end of it.

-- 
Horms
<Prev in Thread] Current Thread [Next in Thread>