polynomial-c    15/06/25 21:13:42

  Added:                atop.rc-r1 atopacct.rc atop-2.2-build.patch
  Log:
  Version bump. Added rewritten init script to fix bug #553246
  
  (Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key 
0x981CA6FC)

Revision  Changes    Path
1.1                  sys-process/atop/files/atop.rc-r1

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/atop/files/atop.rc-r1?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/atop/files/atop.rc-r1?rev=1.1&content-type=text/plain

Index: atop.rc-r1
===================================================================
#!/sbin/runscript
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-process/atop/files/atop.rc-r1,v 1.1 
2015/06/25 21:13:42 polynomial-c Exp $

description="Resource-specific view of processes"
pidfile="/var/run/atop.pid"
command="/usr/bin/atop"

start() {
        ebegin "Starting atop"
        start-stop-daemon --start --pidfile ${pidfile} \
                --exec /etc/atop/atop.daily
        eend $?
}



1.1                  sys-process/atop/files/atopacct.rc

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/atop/files/atopacct.rc?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/atop/files/atopacct.rc?rev=1.1&content-type=text/plain

Index: atopacct.rc
===================================================================
#!/sbin/runscript
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-process/atop/files/atopacct.rc,v 1.1 
2015/06/25 21:13:42 polynomial-c Exp $

description="Resource-specific view of processes"
command="/usr/sbin/atopacctd"
lockfile="/var/lock/subsys/atopacctd"

start_pre() {
        # Check if process accounting already in use via psacct
        for PACCTFILE in /var/account/pacct /var/log/pacct ; do
                if [ -f "${PACCTFILE}" ] ; then
                        BEFORSIZE=$(stat -c %s "${PACCTFILE}")
                        AFTERSIZE=$(stat -c %s "${PACCTFILE}")

                        # verify if accounting file grows, so is in use
                        if [ ${BEFORSIZE} -lt ${AFTERSIZE} ] ; then
                                ewarn "Process accounting already used by 
psacct!"
                                return 1
                        fi
                fi
        done

        checkpath -d -q ${lockfile%/*} || return 1
}

start() {
        ebegin "Starting atopacctd"
        start-stop-daemon --start --exec ${command}
        touch ${lockfile}
        eend $?
}

stop() {
        ebegin "Stopping atopacctd"
        start-stop-daemon --stop --exec ${command}
        rm ${lockfile}
        eend $?
}




1.1                  sys-process/atop/files/atop-2.2-build.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/atop/files/atop-2.2-build.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/atop/files/atop-2.2-build.patch?rev=1.1&content-type=text/plain

Index: atop-2.2-build.patch
===================================================================
--- atop-2.2-3/Makefile
+++ atop-2.2-3/Makefile
@@ -19,7 +19,7 @@
 PMPATH2  = /usr/lib64/pm-utils/sleep.d
 PMPATHD  = /usr/lib/systemd/system-sleep
 
-CFLAGS  += -O2 -I. -Wall        # -DHTTPSTATS
+CFLAGS  += -I. -Wall    # -DHTTPSTATS
 OBJMOD0  = version.o
 OBJMOD1  = various.o  deviate.o   procdbase.o
 OBJMOD2  = acctproc.o photoproc.o photosyst.o  rawlog.o ifprop.o parseable.o
@@ -32,13 +32,13 @@
 all:           atop atopsar atopacctd
 
 atop:          atop.o    $(ALLMODS) Makefile
-               $(CC) atop.o $(ALLMODS) -o atop -lncurses -lz -lm -lrt 
$(LDFLAGS)
+               $(CC) $(CFLAGS) $(LDFLAGS) atop.o $(ALLMODS) -o atop $(shell 
${PKG_CONFIG} --libs ncurses) -lz -lm -lrt
 
 atopsar:       atop
                ln -sf atop atopsar
 
 atopacctd:     atopacctd.o netlink.o
-               $(CC) atopacctd.o netlink.o -o atopacctd $(LDFLAGS)
+               $(CC) $(CFLAGS) $(LDFLAGS) atopacctd.o netlink.o -o atopacctd
 
 netlink.o:     netlink.c
                $(CC) -I. -Wall -c netlink.c




Reply via email to