Re: integer overflow in pre install script

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

 



On 4/22/05, howarbr8@xxxxxxxxxxxxx <howarbr8@xxxxxxxxxxxxx> wrote:
> I have a rpm spec file that checks the amount of free blocks on a mount point
> before installing the rpm.  The rpm has been used for approx. a year now,
> without issue.  Now I have a SATA disk array over 1 TB on a server and when
> the rpm tries to install, it says there is not enough space on the mount
> point.  Knowing there was plenty of free space the suspicion was too large a
> number for the test.  (Doing "[ <first number> -lt <second number> ]")  I
> pulled the test out of the spec file and ran it with /bin/sh and /bin/bash.
> SH had the issue but Bash did not.  My work around was to use up approx. 300
> GB of space with a text file, but that can't be a permanent thing.  It takes
> way too much time to create a file that size.
> 
> So, is there a way I can get rpm to use /bin/bash instead of /bin/sh or some
> other fix?  I have tried putting #!/bin/bash at the top of the script, but
> that does not work. I also tried designating /bin/bash for the build shell to
> use in the .rpmmacros file, but that did not work either.
> 
Wow thats odd.  I am assuming your /bin/sh is a symlink to /bin/bash. 
If that is the case then bash would have some sort of compatibility
stuff going on (except that the symlink /bin/sh to /bin/bash seems to
support the full bash syntax...odd).

Anyway, you can change your %post script to read something like:

   %post -p /bin/bash

Which will force rpm to use bash as the interpretter.

See if that works...james
> Thanks,
> Bryan.
> 
> _______________________________________________
> Rpm-list mailing list
> Rpm-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/rpm-list
>

_______________________________________________
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