ports/158591: [MAINTAINER] sysutils/atop: update to 1.26.b4
Alex Samorukov
samm at os2.kiev.ua
Sat Jul 2 10:30:14 UTC 2011
>Number: 158591
>Category: ports
>Synopsis: [MAINTAINER] sysutils/atop: update to 1.26.b4
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Sat Jul 02 10:30:13 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Alex Samorukov
>Release: FreeBSD 7.3-RELEASE-p4 i386
>Organization:
Net-Art
>Environment:
System: FreeBSD s1.sdv.com.ua 7.3-RELEASE-p4 FreeBSD 7.3-RELEASE-p4 #7: Wed Apr 20 02:46:10 EEST 2011
>Description:
- Update to 1.26.b4
- Fix rc script on FreeBSD 7.xx
- Add "rotate" command to the init script
- Add text message after install
Added file(s):
- files/pkg-message.in
Generated with FreeBSD Port Tools 0.99
>How-To-Repeat:
>Fix:
--- atop-1.26.b4.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/sysutils/atop/Makefile /usr/home/samm/src/atop/Makefile
--- /usr/ports/sysutils/atop/Makefile 2011-07-02 11:01:52.000000000 +0300
+++ /usr/home/samm/src/atop/Makefile 2011-07-02 12:48:27.000000000 +0300
@@ -6,7 +6,7 @@
#
PORTNAME= atop
-PORTVERSION= 1.26.b3
+PORTVERSION= 1.26.b4
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_BERLIOS}
MASTER_SITE_SUBDIR=atop-freebsd
@@ -24,6 +24,8 @@
USE_RC_SUBR= atop
PLIST_SUB+= LOGDIR="${LOGDIR}"
+SUB_FILES= pkg-message
+SUB_LIST= LOGDIR="${LOGDIR}"
do-install:
@${INSTALL_PROGRAM} ${WRKSRC}/atop ${PREFIX}/bin
@@ -38,5 +40,6 @@
${INSTALL_MAN} ${WRKSRC}/AUTHOR ${WRKSRC}/ChangeLog \
${WRKSRC}/README ${DOCSDIR}
.endif
+ @${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>
diff -ruN --exclude=CVS /usr/ports/sysutils/atop/distinfo /usr/home/samm/src/atop/distinfo
--- /usr/ports/sysutils/atop/distinfo 2011-07-02 11:01:52.000000000 +0300
+++ /usr/home/samm/src/atop/distinfo 2011-06-30 21:42:19.000000000 +0300
@@ -1,2 +1,2 @@
-SHA256 (atop-1.26.fbsd.beta3.tar.bz2) = 5c06ee28cc215a88ccec25555253d5d732d7ce5fb43b8c2931f37283fc40f1c8
-SIZE (atop-1.26.fbsd.beta3.tar.bz2) = 130202
+SHA256 (atop-1.26.fbsd.beta4.tar.bz2) = 1ac8ebc8ed47c2789f2eb22b4a84e3b2e624b6c55cc6c827026e3821e861fbb0
+SIZE (atop-1.26.fbsd.beta4.tar.bz2) = 130254
diff -ruN --exclude=CVS /usr/ports/sysutils/atop/files/atop.in /usr/home/samm/src/atop/files/atop.in
--- /usr/ports/sysutils/atop/files/atop.in 2011-07-02 11:01:52.000000000 +0300
+++ /usr/home/samm/src/atop/files/atop.in 2011-07-02 12:45:27.000000000 +0300
@@ -21,7 +21,9 @@
name="atop"
rcvar=`set_rcvar`
command="%%PREFIX%%/bin/atop"
+extra_commands="rotate"
start_cmd="atop_start"
+rotate_cmd="atop_rotate"
atop_start()
{
@@ -29,14 +31,26 @@
echo 1>&2 "${name} already running? (pid=$rc_pid)."
return 1
fi
- check_startmsgs && echo "Starting ${name}."
- /usr/sbin/daemon -p $pidfile ${command} -w /var/log/atop/atop_`date '+%Y%m%d'` ${atop_flags} ${atop_interval}
+ echo "Starting ${name}."
+ /usr/sbin/daemon -p $pidfile ${command} -w ${atop_logdir}/atop_`date '+%Y%m%d'` ${atop_flags} ${atop_interval}
_run_rc_postcmd
}
+atop_rotate()
+{
+
+ echo "Rotating logfile (${name})."
+ # write final sample and stop
+ sig_stop=SIGUSR2
+ /usr/bin/find $atop_logdir -name atop_???????? -mtime +${atop_keepdays} -exec rm {} \;
+ run_rc_command "restart"
+}
+
load_rc_config $name
+: ${atop_logdir="%%LOGDIR%%"}
: ${atop_interval=10}
+: ${atop_keepdays=30}
: ${atop_flags=""}
pidfile="${atop_pidfile}"
diff -ruN --exclude=CVS /usr/ports/sysutils/atop/files/pkg-message.in /usr/home/samm/src/atop/files/pkg-message.in
--- /usr/ports/sysutils/atop/files/pkg-message.in 1970-01-01 03:00:00.000000000 +0300
+++ /usr/home/samm/src/atop/files/pkg-message.in 2011-07-02 12:44:03.000000000 +0300
@@ -0,0 +1,21 @@
+****************************************************************************
+
+atop succesfully installed. To run in interactive mode use "atop" command.
+
+To run the atop in collecting mode from startup, add
+
+atop_enable="YES"
+
+in your /etc/rc.conf.
+
+You will also need to add "rotate" command to the system crontab:
+
+0 0 * * * %%PREFIX%%/etc/rc.d/atop rotate
+
+To change number of days to keep the logs (default - 30) use atop_keepdays
+variable in your /etc/rc.conf file.
+
+To change default (10 seconds) interval use atop_inteval (e.g. atop_interval=5)
+in /etc/rc.conf
+
+****************************************************************************
--- atop-1.26.b4.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list