[Pkg-zenoss-commits] r227 - in /packages/zenoss/trunk/debian/patches: 00list bin-zenoss-fix.dpatch

bzed-guest at users.alioth.debian.org bzed-guest at users.alioth.debian.org
Mon Jul 9 16:57:28 UTC 2007


Author: bzed-guest
Date: Mon Jul  9 16:57:28 2007
New Revision: 227

URL: http://svn.debian.org/wsvn/pkg-zenoss/?sc=1&rev=227
Log:
fixing the script which starts/stops our daemons

Added:
    packages/zenoss/trunk/debian/patches/bin-zenoss-fix.dpatch   (with props)
Modified:
    packages/zenoss/trunk/debian/patches/00list

Modified: packages/zenoss/trunk/debian/patches/00list
URL: http://svn.debian.org/wsvn/pkg-zenoss/packages/zenoss/trunk/debian/patches/00list?rev=227&op=diff
==============================================================================
--- packages/zenoss/trunk/debian/patches/00list (original)
+++ packages/zenoss/trunk/debian/patches/00list Mon Jul  9 16:57:28 2007
@@ -12,3 +12,4 @@
 ZENHOME50-zen2load
 ZENHOME60-rm-extra-check-in-zenbuild
 ZENHOME90-rest-Products
+bin-zenoss-fix

Added: packages/zenoss/trunk/debian/patches/bin-zenoss-fix.dpatch
URL: http://svn.debian.org/wsvn/pkg-zenoss/packages/zenoss/trunk/debian/patches/bin-zenoss-fix.dpatch?rev=227&op=file
==============================================================================
--- packages/zenoss/trunk/debian/patches/bin-zenoss-fix.dpatch (added)
+++ packages/zenoss/trunk/debian/patches/bin-zenoss-fix.dpatch Mon Jul  9 16:57:28 2007
@@ -1,0 +1,70 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## bin-zenoss-fix.dpatch by Bernd Zeimetz <bernd at bzed.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+ at DPATCH@
+diff -urNad zenoss~/bin/zenoss zenoss/bin/zenoss
+--- zenoss~/bin/zenoss	2007-07-09 18:38:40.000000000 +0200
++++ zenoss/bin/zenoss	2007-07-09 18:52:43.000000000 +0200
+@@ -19,37 +19,15 @@
+ #############################################################################
+ # Attempt to set ZENHOME if it is not already set, or bogus
+ # by calculating it relative to the executing command
+-if [ -z "$ZENHOME" -o ! -d "$ZENHOME" ] ; then
+-    # Resolve links: $0 may be a link to zenoss's home.
+-    PRG="$0"
+-    while [ -h "$PRG" ] ; do
+-        ls=`ls -ld "$PRG"`
+-        link=`expr "$ls" : '.*-> \(.*\)$'`
+-        if expr "$link" : '/.*' > /dev/null; then
+-            PRG="$link"
+-        else
+-            PRG=`dirname "$PRG"`"/$link"
+-        fi
+-    done
+-    SAVED="`pwd`"
+-    cd "`dirname \"$PRG\"`/.."
+-    ZENHOME="`pwd -P`"
+-    export ZENHOME
+-    cd "$SAVED"
+-fi
++
++USERNAME=zenoss
++. $(getent passwd zenoss | cut -d : -f 6)/bin/zenfunctions
++
+ 
+ if [ `id -u` -eq 0 ] ; then
+-   USERNAME=`ls -l $ZENHOME/var/Data.fs | awk '{ print $3 }'`
+-   if [ "$USERNAME" = "root" -o -z "$USERNAME" ]  ; then 
+-       echo Unable to determine the right user to run zenoss
+-       exit 1
+-   fi
+-   chown -R $USERNAME $ZENHOME/var
+-   chown -R $USERNAME $ZENHOME/log
+-   exec su - $USERNAME $0 $@
++   exec su - $USERNAME -s /bin/bash -c "/var/lib/zenoss/bin/zenoss $@"
+ fi
+ 
+-. $(getent passwd zenoss | cut -d : -f 6)/bin/zenfunctions
+ C=
+ C="$C zeoctl"
+ C="$C zopectl"
+@@ -64,12 +42,10 @@
+ C="$C zenperfsnmp"
+ C="$C zencommand"
+ C="$C zenprocess"
+-if [ -f $ZENHOME/lib/python/pywmi.py ]
+-then
+-    C="$C zenwin"
+-    C="$C zeneventlog"
+-    C="$C zenwinmodeler"
+-fi
++C="$C zenwin"
++C="$C zeneventlog"
++C="$C zenwinmodeler"
++
+ for i in $ZENHOME/Products/*/daemons/*
+ do
+    if [ -x "$i" ]

Propchange: packages/zenoss/trunk/debian/patches/bin-zenoss-fix.dpatch
------------------------------------------------------------------------------
    svn:executable = *




More information about the Pkg-zenoss-commits mailing list