[OpenAFS] problema con gli RPM - bug nello script di avvio su Mandrake... :-?

Paolo Saggese Paolo.Saggese@libero.it
Fri, 7 Feb 2003 15:55:52 +0100


Hi everybody,

I use Mandrake Linux, currently version 9.0. I use to download the openaf=
s=20
=2Esrc.rpm (for RedHat), change a couple of lines in the spec file and bu=
ild=20
the binaries. Install, start, etc. That works just fine.

But, at least on Mandrake 9.0 systems, the start/stop script /etc/init.d/=
afs=20
has small bug, which cause errors (and some troubles) at system shutdown.

Don't know if the same problem occours also on RedHat... (does it?) :-?

BTW: I have been able to trace down the source of the bug (which is trivi=
al),=20
and to fix the script:


-------8<----------8<----------8<----------8<----------8<----------8<----=
---

--- /etc/init.d/afs~            2003-02-07 14:02:04.000000000 +0100
+++ /etc/init.d/afs             2003-01-16 12:18:54.000000000 +0100
@@ -1,4 +1,5 @@
 #! /bin/sh
+# #! /bin/bash -x
 # Copyright 2000, International Business Machines Corporation and others=
=2E
 # All Rights Reserved.
 #
@@ -285,7 +286,9 @@

        LIBAFS=3D`/sbin/lsmod | fgrep libafs`
        if [ -n "$LIBAFS" ] ; then
-               LIBAFS=3D`gprintf " \n" } { print $1 }'`
+               LIBAFS=3D`gprintf "$LIBAFS \n" | awk '{ print $1 }'`
                /sbin/rmmod $LIBAFS
        fi

-------8<----------8<----------8<----------8<----------8<----------8<----=
---

The problem is: I would like to fix this in the RPM. But I couldn't find =
where=20
and how this script is taken from / generated during the package build...=
 :-?

Any hint?

Thanks in advance.


Ciao e grazie,
=09=09=09=09Paolo.

-- =20
ICQ UIN: 105205475 (UnixMan)
http://borex.lngs.infn.it/saggese
You can still escape from the GATES of hell: Use Linux!