On Tue, 26 Jun 2001, Sebastian Dransfeld wrote:

> This in one long line:
> 
> if [ $1 = 0 ]; then service random stop > /dev/null 2>/dev/null || :;
> /sbin/chkconfig --del random; fi if [ $1 = 0 ]; then service netfs stop >
> /dev/null 2>/dev/null || :; /sbin/chkconfig --del netfs; fi if [ $1 = 0 ];
> then service network stop > /dev/null 2>/dev/null || :; /sbin/chkconfig
> --del network; fi if [ $1 = 0 ]; then service rawdevices stop > /dev/null
> 2>/dev/null || :; /sbin/chkconfig --del rawdevices; fi if [ $1 = 0 ]; then
> service usb stop > /dev/null 2>/dev/null || :; /sbin/chkconfig --del usb;
> fi if [ $1 = 0 ]; then service sound stop > /dev/null 2>/dev/null || :;
> /sbin/chkconfig --del sound; fi if [ $1 = 0 ]; then service alsa stop >
> /dev/null 2>/dev/null || :; /sbin/chkconfig --del alsa; fi if [ $1 = 0 ];
> then service kheader stop > /dev/null 2>/dev/null || :; /sbin/chkconfig
> --del kheader; fi
> 
> Should perhaps be some linebreaks, and why som many if's? Isn't one
> enough?

This comes from the %_preun_service() macro, which is missing a ';'
character. The patch below has to be applied to all relevant files
in rpm.

Arnd <><

--- /tmp/macros.orig Tue Jun 26 15:09:12 2001
+++ /usr/lib/rpm/i586-mandrake-linux/macros    Tue Jun 26 15:19:00 2001
@@ -125,6 +125,6 @@
 %serverbuild export CFLAGS="%optflags -fno-omit-frame-pointer"; export 
CXXFLAGS="%optflags -fno-omit-frame-pointer"; export RPM_OPT_FLAGS="%optflags 
-fno-omit-frame-pointer"
 
 # initscripts macros
-%_post_service() if [ $1 = 1 ]; then /sbin/chkconfig --add %{1}; else if [ -f 
/var/lock/subsys/%{1} ]; then service %{1} restart > /dev/null 2>/dev/null || : ; fi; 
fi %{nil}
+%_post_service() if [ $1 = 1 ]; then /sbin/chkconfig --add %{1}; else if [ -f 
+/var/lock/subsys/%{1} ]; then service %{1} restart > /dev/null 2>/dev/null || : ; fi; 
+fi; %{nil}
 
-%_preun_service() if [ $1 = 0 ]; then service %{1} stop > /dev/null 2>/dev/null || :; 
/sbin/chkconfig --del %{1}; fi %{nil}
+%_preun_service() if [ $1 = 0 ]; then service %{1} stop > /dev/null 2>/dev/null || :; 
+/sbin/chkconfig --del %{1}; fi; %{nil}


Reply via email to