aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authoredwin <edwin@FreeBSD.org>2006-01-02 18:05:11 +0800
committeredwin <edwin@FreeBSD.org>2006-01-02 18:05:11 +0800
commite4dafabd66318db71217e7a18a8d9ef22ae317da (patch)
tree9072efb00434431cf12151ac099f99aa423077b3 /net
parentce5f8afe1c528c84cc9d608fa4fdce22d16a8c05 (diff)
downloadfreebsd-ports-gnome-e4dafabd66318db71217e7a18a8d9ef22ae317da.tar.gz
freebsd-ports-gnome-e4dafabd66318db71217e7a18a8d9ef22ae317da.tar.zst
freebsd-ports-gnome-e4dafabd66318db71217e7a18a8d9ef22ae317da.zip
[PATCH] net/cvsup-mirror: add some install time options for update.sh
Add following install time options for update.sh - Whether or not /var/log/cvsup.log is rotated when update.sh is invoked. - Maximum number of log files. - Wheter or not old log file is gzipped after rotated. PR: ports/81598 Submitted by: KIMURA Yasuhiro <yasu@utahime.org> Not objected by: jdp@FreeBSD.org
Diffstat (limited to 'net')
-rw-r--r--net/cvsup-mirror/Makefile2
-rw-r--r--net/cvsup-mirror/files/update.sh18
-rw-r--r--net/cvsup-mirror/pkg-deinstall5
-rw-r--r--net/cvsup-mirror/pkg-install3
4 files changed, 7 insertions, 21 deletions
diff --git a/net/cvsup-mirror/Makefile b/net/cvsup-mirror/Makefile
index eecd3ee3145b..9eb1a22215b3 100644
--- a/net/cvsup-mirror/Makefile
+++ b/net/cvsup-mirror/Makefile
@@ -7,7 +7,7 @@
PORTNAME= cvsup-mirror
PORTVERSION= 1.3
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= net
DISTFILES=
diff --git a/net/cvsup-mirror/files/update.sh b/net/cvsup-mirror/files/update.sh
index d67e9252a7d1..f0af07111bd7 100644
--- a/net/cvsup-mirror/files/update.sh
+++ b/net/cvsup-mirror/files/update.sh
@@ -12,25 +12,9 @@ export PATH=/bin:/usr/bin:${PREFIX}/bin
lock=/var/spool/lock/cvsup.lock
log=/var/log/cvsup.log
-num_logs=8
-use_gzip=0
-
-if [ ${use_gzip} != 0 ]
-then
- gz_ext=.gz
-fi
-
-# Rotate the log files
-
umask 22
-for i in $(/usr/bin/jot ${num_logs} $((${num_logs}-1)) 0)
-do
- test -f ${log}.$i${gz_ext} && mv -f ${log}.$i${gz_ext} ${log}.$(($i+1))${gz_ext}
-done
-
-test -f ${log} && mv -f ${log} ${log}.0 && [ ${use_gzip} != 0 ] && /usr/bin/gzip -9 ${log}.0
-exec >${log} 2>&1
+exec >>${log} 2>&1
# Do the update
diff --git a/net/cvsup-mirror/pkg-deinstall b/net/cvsup-mirror/pkg-deinstall
index de1a3a908617..695b7874751e 100644
--- a/net/cvsup-mirror/pkg-deinstall
+++ b/net/cvsup-mirror/pkg-deinstall
@@ -97,9 +97,10 @@ then
echo "Done."
fi
-if yesno "Do you want me to remove the cvsupd log entry from \
+if yesno "Do you want me to remove the cvsup and cvsupd log entries from \
\"/etc/newsyslog.conf\"" y; then
- sed "/cvsupd\.log/d" /etc/newsyslog.conf >${tmp} || exit
+ sed "/cvsup\.log/d
+ /cvsupd\.log/d" /etc/newsyslog.conf >${tmp} || exit
chmod 644 ${tmp}
mv ${tmp} /etc/newsyslog.conf || exit
echo "Done."
diff --git a/net/cvsup-mirror/pkg-install b/net/cvsup-mirror/pkg-install
index 27b6dfb1ba71..2a2576c99e23 100644
--- a/net/cvsup-mirror/pkg-install
+++ b/net/cvsup-mirror/pkg-install
@@ -188,8 +188,9 @@ EOF
kill -HUP $(cat /var/run/syslog.pid)
fi
- echo "Adding cvsupd log entry to \"/etc/newsyslog.conf\"."
+ echo "Adding cvsup and cvsupd log entry to \"/etc/newsyslog.conf\"."
cat <<EOF >>/etc/newsyslog.conf
+/var/log/cvsup.log 664 7 * 24 Z
/var/log/cvsupd.log 664 7 * 24 Z
EOF
echo "Done."