Hi,
A little patch for specfile:
- remove init links only when uninstalling the last rpm
- use %{_sysconfdir} in scriptlet
And a question: why use an absolute path for chkconfig and update-rc.d?
Isn't it better without PATH, such that the preferred chkconfig is used?
Did it broke on a platform?
Pat
Index: eagle-usb.spec
===================================================================
RCS file: /cvs/eagleusb/eagleusb/eagle-usb.spec,v
retrieving revision 1.14
diff -u -3 -p -u -r1.14 eagle-usb.spec
--- eagle-usb.spec 18 Oct 2004 21:30:21 -0000 1.14
+++ eagle-usb.spec 20 Oct 2004 19:15:52 -0000
@@ -46,15 +46,19 @@ hash -r
%preun
%{_sbindir}/fctStopAdsl -sf
+
+if [ "$1" = 0 ]; then
# disable autostart service
# - mandrake specific script
if test -e /etc/init.d/internet ; then \
/sbin/chkconfig --del internet &>/dev/null ; \
fi
# - generic script
-if test -e /etc/init.d/eagle-usb ; then \
+if test -e %{_sysconfdir}/init.d/eagle-usb ; then \
/sbin/chkconfig --del eagle-usb &>/dev/null ; \
/sbin/update-rc.d -f eagle-usb remove &>/dev/null ; \
+fi
+
fi
# return 0
echo -n