BTW, while researching this problem, I ran across this line in the "Red
Hat RPM Guide" book on page 194.
if [ "$1" = 0 ] ; then
/sbin/service ypbind stop > /dev/null 2>&1
/sbin/chkconfig --del ypbind
Can someone please explain to me what "2>&1" means/does?
On 11/11/2010 11:47 AM, Joe Flowers wrote:
> Hello Everyone,
> I have created a spec file and an RPM file from it but I bungled a
> command which uncovered an interesting problem.
> In the %preun section of the spec file, I mistakenly put
> instead of
> /etc/ini.d/mydaemon stop
> When I went to uninstall the RPM, like
> rpm -e mydaemon-1.00-1
> It failed on the bad (/etc/ini.d/mydaemon/stop) line and would not
> complete the uninstall.
> So, I'm wondering if there is something that I can add to the bad
> /etc/ini.d/mydaemon/stop line in my spec file that will allow "rpm -e
> ..." to complete the uninstall.
> Analogously, I know that you can add a "-" in front of commands in a
> Makefile so that make will not fatally exit. I'm looking for the same
> functionality in the spec file.
Received on Thu Nov 11 18:28:05 2010