pcp
[Top] [All Lists]

Debian patch for latest version of PCP

To: pcp@xxxxxxxxxxx
Subject: Debian patch for latest version of PCP
From: Luc Stepniewski <lstep@xxxxxxx>
Date: Sat, 02 Dec 2000 17:30:59 +0100
Cc: markgw@xxxxxxx
Reply-to: lstep@xxxxxxx
Sender: owner-pcp@xxxxxxxxxxx
Hi,

I updated the debian package for PCP to work with
PCP 2.1.11.

* I modified the rc-proc.sh to be compatible with
Debian (otherwise pcp won't start at all), without
destroying anything to keep compatibility
with other platforms (tests with /etc/debian_version
to see if we're on a debian box).
I've used the update-rc.d debian tool to update
the links which is a lot easier than doing symlinks
everywhere :-)

It would be really cool if the changes I made to
rc-proc.sh could be integrated in the official
distribution.

* I applied the latest patch for that bug reported
to Mark this week, and not yet included in official
release.

* The Apache pmda is functionnal

* About the weblog pmda, there is no manpage
for pmdaweblog, and /var/pcp/config/web is empty.
Is that normal ?

What is the current status about adding the debian/
directory to official distribution ? The last time
I asked you told there was a legal discussion about
this. Has this been solved ?
There's a directory for tgz creation, a directory
for rpm creation, but still no directory for
debian :-( Looking at my debian/ parameters directory,
it takes less than 23Ko.

As usual, you can retrieve the pcp debian package on
ftp://ftp.adequat.net/pub/debian/

Luc Stepniewski
Ps: Here attached the diffs to apply to rc-proc.sh to
make it work on debian.
-- 
Luc Stepniewski <lstep@xxxxxxxxxxx> <http://lstep.free.fr/>
Adequat - Securite, Linux     Public key: <http://lstep.free.fr/pubkey.txt>
Key D93B2D2D fingerprint = 49 00 CC D1 69 03 E2 94  C8 78 ED 3C 75 89 A8 DE
--- rc-proc.sh.old      Mon Nov 27 23:57:55 2000
+++ rc-proc.sh  Sat Dec  2 16:47:40 2000
@@ -88,9 +88,16 @@
        #
        # don't have chkconfig, so use the existence of the symlink
        #
-       if ls /etc/rc.d/rc$_rl.d/S[0-9]*$_flag >/dev/null 2>&1
-       then
-           _ret=0 # on
+       if [ -f /etc/debian_version ]; then
+          if ls /etc/rc$_rl.d/S[0-9]*$_flag >/dev/null 2>&1
+          then
+             _ret=0 # on
+          fi
+       else
+          if ls /etc/rc.d/rc$_rl.d/S[0-9]*$_flag >/dev/null 2>&1
+          then
+             _ret=0 # on
+          fi
        fi
     fi
 
@@ -117,11 +124,15 @@
     else
        _start=`_runlevel_start $_flag`
        _stop=`_runlevel_stop $_flag`
-       for _r in `_runlevels $_flag`
-       do
-           ln -sf ../init.d/$_flag /etc/rc.d/rc$_r.d/S$_start""$_flag 
>/dev/null 2>&1
-           ln -sf ../init.d/$_flag /etc/rc.d/rc$_r.d/K$_stop""$_flag 
>/dev/null 2>&1
-       done
+       if [ -f /etc/debian_version ]; then
+          update-rc.d -f $_flag defaults s$_start k$_stop
+       else
+          for _r in `_runlevels $_flag`
+          do
+              ln -sf ../init.d/$_flag /etc/rc.d/rc$_r.d/S$_start""$_flag 
>/dev/null 2>&1
+              ln -sf ../init.d/$_flag /etc/rc.d/rc$_r.d/K$_stop""$_flag 
>/dev/null 2>&1
+          done
+       fi
     fi
 
     return 0
@@ -145,7 +156,11 @@
        chkconfig --level 2345 "$_flag" off >/dev/null 2>&1
     else
        # remove the symlinks
-       rm -f /etc/rc.d/rc[0-9].d/[SK][0-9]*$_flag >/dev/null 2>&1
+       if [ -f /etc/debian_version ]; then
+          update-rc.d -f $_flag remove
+       else
+         rm -f /etc/rc.d/rc[0-9].d/[SK][0-9]*$_flag >/dev/null 2>&1
+       fi
     fi
 
     return 0
@@ -167,13 +182,17 @@
        _cmd=`which chkconfig`
        echo "    # $_cmd $_flag on"
     else
-       _start=`_runlevel_start $_flag`
-       _stop=`_runlevel_stop $_flag`
-       for _r in `_runlevels $_flag`
-       do
-           echo "    # ln -sf ../init.d/$_flag 
/etc/rc.d/rc$_r.d/S$_start""$_flag"
-           echo "    # ln -sf ../init.d/$_flag 
/etc/rc.d/rc$_r.d/K$_stop""$_flag"
-       done
+       if [ -f /etc/debian_version ]; then
+         echo "         update-rc.d -f $_flag defaults s$_start k$_stop"
+       else
+         _start=`_runlevel_start $_flag`
+         _stop=`_runlevel_stop $_flag`
+         for _r in `_runlevels $_flag`
+         do
+             echo "    # ln -sf ../init.d/$_flag 
/etc/rc.d/rc$_r.d/S$_start""$_flag"
+             echo "    # ln -sf ../init.d/$_flag 
/etc/rc.d/rc$_r.d/K$_stop""$_flag"
+         done
+       fi
     fi
 
     return 0
<Prev in Thread] Current Thread [Next in Thread>