I&#39;m trying to install an rpm that has a post-install action.<br>During this phase I notice with ps that a temporary script named /var/tmp/rpm-tmp.67318 is created and executed. <br>And its contents are the same as what stored inside the rpm (query done with rpm -qp --scripts package.rpm)<br>
Inside the postinstall script there is a call to another script (something.sh).<br>In this latest script there is a test such as :<br><br>&nbsp;&nbsp;&nbsp;&nbsp; if [ -f $file ]; then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cp -vf $file /some/dir<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if [ $? -eq 0 ]; then<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo &quot;$file copied sucessfully!!!&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fi<br>&nbsp;&nbsp;&nbsp;&nbsp; else<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .....<br>&nbsp;&nbsp;&nbsp;&nbsp; fi<br><br>I want the script to find the $file so that it skips the &quot;else&quot; section.<br><br>$file is a filename without any path or prefix.<br>
<br>I have no source rpm.<br><br>So the question is: supposed that in /var/tmp/rpm-tmp.67318 and in something.sh there isn&#39;t any CD command, in which dir would happen the check about the presence of $file?<br>it seems that if I place the file in the same directory where I run the &quot;rpm -ivh package.rpm&quot; command doesn&#39;t work...<br>
<br>Thanks in advance.<br>Gianluca<br><br>