Index: head/net/smokeping/Makefile =================================================================== --- head/net/smokeping/Makefile (revision 60506) +++ head/net/smokeping/Makefile (revision 60507) @@ -1,105 +1,109 @@ # New ports collection makefile for: SmokePing # Date created: Tue Feb 12 22:17:40 CET 2002 # Whom: Lars Thegler # # $FreeBSD$ # PORTNAME= smokeping -PORTVERSION= 1.8 +PORTVERSION= 1.12 CATEGORIES= net www MASTER_SITES= http://people.ee.ethz.ch/~oetiker/webtools/smokeping/pub/ MAINTAINER= lars@thegler.dk BUILD_DEPENDS= rrdtool:${PORTSDIR}/net/rrdtool \ ${SITE_PERL}/CGI/SpeedyCGI.pm:${PORTSDIR}/www/p5-CGI-SpeedyCGI \ ${SITE_PERL}/BER.pm:${PORTSDIR}/net/p5-SNMP_Session \ + ${SITE_PERL}/CGI.pm:${PORTSDIR}/www/p5-CGI.pm \ + ${SITE_PERL}/${PERL_ARCH}/Digest/MD5.pm:${PORTSDIR}/security/p5-Digest-MD5 \ + ${SITE_PERL}/Pod/Usage.pm:${PORTSDIR}/textproc/p5-PodParser \ ${LOCALBASE}/sbin/fping:${PORTSDIR}/net/fping USE_PERL5= yes MAN1= EchoPing.pm.1 EchoPingChargen.pm.1 EchoPingDiscard.pm.1 \ EchoPingHttp.pm.1 EchoPingHttps.pm.1 \ EchoPingIcp.pm.1 EchoPingSmtp.pm.1 \ - FPing.pm.1 ParseConfig.pm.1 Smokeping.pm.1 \ + FPing.pm.1 FPing6.pm.1 ParseConfig.pm.1 Smokeping.pm.1 \ base.pm.1 basefork.pm.1 basevars.pm.1 \ smokeping.1 smokeping.cgi.1 \ smokeping_config.1 smokeping_install.1 PKGMESSAGE= ${WRKDIR}/pkg-message SITE_PERL= ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER} DOCDIR= ${PREFIX}/share/doc/smokeping DOC1= CHANGES CONTRIBUTORS COPYING COPYRIGHT README TODO DOC2= EchoPing.pm EchoPingChargen.pm EchoPingDiscard.pm \ EchoPingHttp.pm EchoPingHttps.pm \ EchoPingIcp.pm EchoPingSmtp.pm \ - FPing.pm ParseConfig.pm Smokeping.pm \ + FPing.pm FPing6.pm ParseConfig.pm Smokeping.pm \ base.pm basefork.pm basevars.pm smokeping.cgi \ smokeping smokeping_config smokeping_install ETC1= basepage.html config smokemail config-echoping pre-patch: @${MV} ${WRKSRC}/bin/smokeping.dist ${WRKSRC}/bin/smokeping @${MV} ${WRKSRC}/htdocs/smokeping.cgi.dist ${WRKSRC}/htdocs/smokeping.cgi @${PERL} -pi -e ' \ s|/usr/sepp/bin/perl|${PERL}|; \ s|/usr/sepp/bin/speedy|${PREFIX}/bin/speedy|; \ s|use lib qw\(/usr/pack/rrdtool-1.0.33-to/lib/perl\);\n||; \ s|/home/oetiker/data/projects/AADJ-smokeping/dist/etc|${PREFIX}/etc/smokeping|; \ s|/home/oetiker/data/projects/AADJ-smokeping/dist|${PREFIX}/smokeping|; \ s|/home/oetiker/.smokeping/config|${PREFIX}/etc/smokeping/config|; \ s|/usr/lib/sendmail|/usr/sbin/sendmail|; \ s|/usr/sepp/bin/fping|${PREFIX}/sbin/fping|; \ - s|piddir = /usr/local/smokeping/var|piddir = ${PREFIX}/var/smokeping|; \ + s|dir = /usr/local/smokeping/var|dir = ${PREFIX}/var/smokeping|; \ s|imgcache = /home/oetiker/public_html/.simg|imgcache = ${PREFIX}/smokeping/htdocs/img|; \ s|imgurl = ../.simg|imgurl = /smokeimg|; \ ' \ ${WRKSRC}/bin/smokeping ${WRKSRC}/htdocs/smokeping.cgi ${WRKSRC}/etc/config.dist @${PERL} -p -e ' \ s|%%PREFIX%%|${PREFIX}|g; \ ' \ ${PKGDIR}/pkg-message > ${PKGMESSAGE} do-build: @${RM} ${WRKSRC}/lib/BER.pm @${RM} ${WRKSRC}/lib/SNMP_*.pm + @${RM} ${WRKSRC}/probe-report.patch pre-install: PKG_PREFIX=${PREFIX} ${SH} pkg-install ${PKGNAME} PRE-INSTALL do-install: @${INSTALL_SCRIPT} ${WRKSRC}/bin/smokeping ${PREFIX}/bin .for file in ${MAN1} @${INSTALL_MAN} ${WRKSRC}/doc/${file} ${PREFIX}/man/man1 .endfor @${MKDIR} ${DOCDIR} .for file in ${DOC1} @${INSTALL_DATA} ${WRKSRC}/${file} ${DOCDIR} .endfor .for file in ${DOC2} @${INSTALL_DATA} ${WRKSRC}/doc/${file}.html ${DOCDIR} @${INSTALL_DATA} ${WRKSRC}/doc/${file}.txt ${DOCDIR} .endfor @${MKDIR} ${PREFIX}/etc/smokeping .for file in ${ETC1} @${INSTALL_DATA} ${WRKSRC}/etc/${file}.dist ${PREFIX}/etc/smokeping @if [ ! -f ${PREFIX}/etc/smokeping/${file} ]; then \ ${INSTALL_DATA} ${WRKSRC}/etc/${file}.dist ${PREFIX}/etc/smokeping/${file} ; \ fi .endfor @${MKDIR} ${PREFIX}/smokeping @${CP} -Rp ${WRKSRC}/[hl]* ${PREFIX}/smokeping/ @${MKDIR} ${PREFIX}/var/smokeping @${CHOWN} smokeping:smokeping ${PREFIX}/var/smokeping @${MKDIR} ${PREFIX}/smokeping/htdocs/img @${CHOWN} www:www ${PREFIX}/smokeping/htdocs/img @if [ ! -f ${PREFIX}/etc/rc.d/smokeping.sh ]; then \ ${ECHO} "Installing ${PREFIX}/etc/rc.d/smokeping.sh startup file."; \ ${INSTALL_SCRIPT} ${FILESDIR}/smokeping.sh ${PREFIX}/etc/rc.d/smokeping.sh; \ fi post-install: @${CAT} ${PKGMESSAGE} .include Property changes on: head/net/smokeping/Makefile ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.4 \ No newline at end of property +1.5 \ No newline at end of property Index: head/net/smokeping/distinfo =================================================================== --- head/net/smokeping/distinfo (revision 60506) +++ head/net/smokeping/distinfo (revision 60507) @@ -1 +1 @@ -MD5 (smokeping-1.8.tar.gz) = 0be3dccdeea9ce0180ac33c08ce55ee8 +MD5 (smokeping-1.12.tar.gz) = 959dd5b64f067c3f6bfaf26a33f640fa Property changes on: head/net/smokeping/distinfo ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.3 \ No newline at end of property +1.4 \ No newline at end of property Index: head/net/smokeping/pkg-deinstall =================================================================== --- head/net/smokeping/pkg-deinstall (revision 60506) +++ head/net/smokeping/pkg-deinstall (revision 60507) @@ -1,23 +1,86 @@ #!/bin/sh +# # $FreeBSD$ # +ask() { + local question default answer + + question=$1 + default=$2 + if [ -z "${PACKAGE_BUILDING}" ]; then + read -p "${question} [${default}]? " answer + fi + if [ x${answer} = x ]; then + answer=${default} + fi + echo ${answer} +} + +yesno() { + local dflt question answer + + question=$1 + dflt=$2 + while :; do + answer=$(ask "${question}" "${dflt}") + case "${answer}" in + [Yy]*) return 0;; + [Nn]*) return 1;; + esac + echo "Please answer yes or no." + done +} + +delete_account() { + local u g home + + u=$1 + g=$2 + if yesno "Do you want me to remove group \"${g}\"" y; then + pw groupdel -n ${g} + echo "Done." + fi + if yesno "Do you want me to remove user \"${u}\"" y; then + eval home=~${u} + pw userdel -n ${u} + echo "Done." + if [ -d "${home}" ]; then + echo "Please remember to check if there's any unsent mail left" + echo "in the home directory \"${home}\"" + fi + + fi +} + if [ -f ${PKG_PREFIX}/var/smokeping/smokeping.pid ]; then if [ -x ${PKG_PREFIX}/etc/rc.d/smokeping.sh ]; then ${PKG_PREFIX}/etc/rc.d/smokeping.sh stop > /dev/null fi rm ${PKG_PREFIX}/var/smokeping/smokeping.pid fi if [ "$2" != "POST-DEINSTALL" ]; then exit 0 fi -if [ -d ${PKG_PREFIX}/smokeping ]; then - echo "----------------------------------------------------------------" - echo "To delete your custom SmokePing configuration and all collected" - echo "data permanently, use 'rm -R ${PKG_PREFIX}/smokeping'" - echo "----------------------------------------------------------------" -fi +if [ ! -n "$BATCH" ]; then -exit 0 + if [ -d ${PKG_PREFIX}/etc/smokeping ]; then + echo "You have some custom SmokePing configuration in \"${PKG_PREFIX}/etc/smokeping/\"." + if yesno "Would you like me to remove it" y; then + rm -R ${PKG_PREFIX}/etc/smokeping + echo "Done." + fi + fi + + if [ -d ${PKG_PREFIX}/var/smokeping ]; then + echo "You have some collected data in \"${PKG_PREFIX}/var/smokeping/\"." + if yesno "Would you like me to remove it" y; then + rm -R ${PKG_PREFIX}/var/smokeping + echo "Done." + fi + fi + + delete_account smokeping smokeping +fi Property changes on: head/net/smokeping/pkg-deinstall ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.2 \ No newline at end of property +1.3 \ No newline at end of property Index: head/net/smokeping/pkg-install =================================================================== --- head/net/smokeping/pkg-install (revision 60506) +++ head/net/smokeping/pkg-install (revision 60507) @@ -1,118 +1,121 @@ #! /bin/sh +# +# $FreeBSD$ +# ask() { local question default answer question=$1 default=$2 if [ -z "${PACKAGE_BUILDING}" ]; then read -p "${question} [${default}]? " answer fi if [ x${answer} = x ]; then answer=${default} fi echo ${answer} } yesno() { local dflt question answer question=$1 dflt=$2 while :; do answer=$(ask "${question}" "${dflt}") case "${answer}" in [Yy]*) return 0;; [Nn]*) return 1;; esac echo "Please answer yes or no." done } make_account() { local u g gcos homeopt home u=$1 g=$2 gcos=$3 homeopt=${4:+"-d $4"} if pw group show "${g}" >/dev/null 2>&1; then echo "You already have a group \"${g}\", so I will use it." else echo "You need a group \"${g}\"." if which -s pw && yesno "Would you like me to create it" y; then pw groupadd ${g} || exit echo "Done." else echo "Please create it, and try again." if ! grep -q "^${u}:" /etc/passwd; then echo "While you're at it, please create a user \"${u}\" too," echo "with a default group of \"${g}\"." fi exit 1 fi fi if pw user show "${u}" >/dev/null 2>&1; then echo "You already have a user \"${u}\", so I will use it." else echo "You need a user \"${u}\"." if which -s pw && yesno "Would you like me to create it" y; then pw useradd ${u} -g ${g} -h - ${homeopt} \ -s /nonexistent -c "${gcos}" || exit echo "Done." else echo "Please create it, and try again." exit 1 fi fi if [ x"$homeopt" = x ]; then eval home=~${u} if [ ! -d "${home}" ]; then if yesno \ "Would you like me to create ${u}'s home directory (${home})" y then (umask 77 && \ mkdir -p ${home}) || exit chown -R ${u}:${g} ${home} || exit else echo "Please create it, and try again." exit 1 fi fi fi } if [ "$2" != "PRE-INSTALL" ]; then exit 0 fi USER=www GROUP=${USER} UID=80 GID=${UID} if ! pw groupshow "${GROUP}" 2>/dev/null 1>&2; then if pw groupadd ${GROUP} -g ${GID}; then echo "Added group \"${GROUP}\"." else echo "Adding group \"${GROUP}\" failed..." exit 1 fi fi if ! pw usershow "${USER}" 2>/dev/null 1>&2; then if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \ -s "/sbin/nologin" -d "/nonexistent" \ -c "World Wide Web Owner"; \ then echo "Added user \"${USER}\"." else echo "Adding user \"${USER}\" failed..." exit 1 fi fi make_account smokeping smokeping "SmokePing Daemon" "/nonexistent" Property changes on: head/net/smokeping/pkg-install ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.1 \ No newline at end of property +1.2 \ No newline at end of property Index: head/net/smokeping/pkg-plist =================================================================== --- head/net/smokeping/pkg-plist (revision 60506) +++ head/net/smokeping/pkg-plist (revision 60507) @@ -1,80 +1,83 @@ bin/smokeping etc/rc.d/smokeping.sh @unexec if cmp -s %D/etc/smokeping/basepage.html %D/etc/smokeping/basepage.html.dist; then rm -f %D/etc/smokeping/basepage.html; fi etc/smokeping/basepage.html.dist @exec [ -f %B/basepage.html ] || cp %B/%f %B/basepage.html @unexec if cmp -s %D/etc/smokeping/config %D/etc/smokeping/config.dist; then rm -f %D/etc/smokeping/config; fi etc/smokeping/config.dist @exec [ -f %B/config ] || cp %B/%f %B/config @unexec if cmp -s %D/etc/smokeping/smokemail %D/etc/smokeping/smokemail.dist; then rm -f %D/etc/smokeping/smokemail; fi etc/smokeping/smokemail.dist @exec [ -f %B/smokemail ] || cp %B/%f %B/smokemail @unexec if cmp -s %D/etc/smokeping/config-echoping %D/etc/smokeping/config-echoping.dist; then rm -f %D/etc/smokeping/config-echoping; fi etc/smokeping/config-echoping.dist @exec [ -f %B/config-echoping ] || cp %B/%f %B/config-echoping share/doc/smokeping/CHANGES share/doc/smokeping/CONTRIBUTORS share/doc/smokeping/COPYING share/doc/smokeping/COPYRIGHT share/doc/smokeping/README share/doc/smokeping/TODO share/doc/smokeping/EchoPing.pm.html share/doc/smokeping/EchoPing.pm.txt share/doc/smokeping/EchoPingChargen.pm.html share/doc/smokeping/EchoPingChargen.pm.txt share/doc/smokeping/EchoPingDiscard.pm.html share/doc/smokeping/EchoPingDiscard.pm.txt share/doc/smokeping/EchoPingHttp.pm.html share/doc/smokeping/EchoPingHttp.pm.txt share/doc/smokeping/EchoPingHttps.pm.html share/doc/smokeping/EchoPingHttps.pm.txt share/doc/smokeping/EchoPingIcp.pm.html share/doc/smokeping/EchoPingIcp.pm.txt share/doc/smokeping/EchoPingSmtp.pm.html share/doc/smokeping/EchoPingSmtp.pm.txt share/doc/smokeping/FPing.pm.html share/doc/smokeping/FPing.pm.txt +share/doc/smokeping/FPing6.pm.html +share/doc/smokeping/FPing6.pm.txt share/doc/smokeping/ParseConfig.pm.html share/doc/smokeping/ParseConfig.pm.txt share/doc/smokeping/Smokeping.pm.html share/doc/smokeping/Smokeping.pm.txt share/doc/smokeping/base.pm.html share/doc/smokeping/base.pm.txt share/doc/smokeping/basefork.pm.html share/doc/smokeping/basefork.pm.txt share/doc/smokeping/basevars.pm.html share/doc/smokeping/basevars.pm.txt share/doc/smokeping/smokeping.cgi.html share/doc/smokeping/smokeping.cgi.txt share/doc/smokeping/smokeping.html share/doc/smokeping/smokeping.txt share/doc/smokeping/smokeping_config.html share/doc/smokeping/smokeping_config.txt share/doc/smokeping/smokeping_install.html share/doc/smokeping/smokeping_install.txt smokeping/htdocs/smokeping.cgi smokeping/lib/Smokeping.pm smokeping/lib/probes/FPing.pm +smokeping/lib/probes/FPing6.pm smokeping/lib/probes/base.pm smokeping/lib/probes/EchoPing.pm smokeping/lib/probes/EchoPingChargen.pm smokeping/lib/probes/EchoPingDiscard.pm smokeping/lib/probes/EchoPingHttp.pm smokeping/lib/probes/EchoPingHttps.pm smokeping/lib/probes/EchoPingIcp.pm smokeping/lib/probes/EchoPingSmtp.pm smokeping/lib/probes/basefork.pm smokeping/lib/probes/basevars.pm smokeping/lib/ISG/ParseConfig.pm @unexec rmdir %D/etc/smokeping || true @exec mkdir -p %D/smokeping/htdocs/img; chown www:www %D/smokeping/htdocs/img @unexec rm -rf %D/smokeping/htdocs/img @exec mkdir -p %D/var/smokeping @exec chown smokeping:smokeping %D/var/smokeping @unexec rmdir %D/var/smokeping 2>/dev/null || true @dirrm smokeping/htdocs @dirrm smokeping/lib/probes @dirrm smokeping/lib/ISG @dirrm smokeping/lib @dirrm share/doc/smokeping @unexec rmdir %D/smokeping 2>/dev/null || true Property changes on: head/net/smokeping/pkg-plist ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.2 \ No newline at end of property +1.3 \ No newline at end of property Index: head/net-mgmt/smokeping/Makefile =================================================================== --- head/net-mgmt/smokeping/Makefile (revision 60506) +++ head/net-mgmt/smokeping/Makefile (revision 60507) @@ -1,105 +1,109 @@ # New ports collection makefile for: SmokePing # Date created: Tue Feb 12 22:17:40 CET 2002 # Whom: Lars Thegler # # $FreeBSD$ # PORTNAME= smokeping -PORTVERSION= 1.8 +PORTVERSION= 1.12 CATEGORIES= net www MASTER_SITES= http://people.ee.ethz.ch/~oetiker/webtools/smokeping/pub/ MAINTAINER= lars@thegler.dk BUILD_DEPENDS= rrdtool:${PORTSDIR}/net/rrdtool \ ${SITE_PERL}/CGI/SpeedyCGI.pm:${PORTSDIR}/www/p5-CGI-SpeedyCGI \ ${SITE_PERL}/BER.pm:${PORTSDIR}/net/p5-SNMP_Session \ + ${SITE_PERL}/CGI.pm:${PORTSDIR}/www/p5-CGI.pm \ + ${SITE_PERL}/${PERL_ARCH}/Digest/MD5.pm:${PORTSDIR}/security/p5-Digest-MD5 \ + ${SITE_PERL}/Pod/Usage.pm:${PORTSDIR}/textproc/p5-PodParser \ ${LOCALBASE}/sbin/fping:${PORTSDIR}/net/fping USE_PERL5= yes MAN1= EchoPing.pm.1 EchoPingChargen.pm.1 EchoPingDiscard.pm.1 \ EchoPingHttp.pm.1 EchoPingHttps.pm.1 \ EchoPingIcp.pm.1 EchoPingSmtp.pm.1 \ - FPing.pm.1 ParseConfig.pm.1 Smokeping.pm.1 \ + FPing.pm.1 FPing6.pm.1 ParseConfig.pm.1 Smokeping.pm.1 \ base.pm.1 basefork.pm.1 basevars.pm.1 \ smokeping.1 smokeping.cgi.1 \ smokeping_config.1 smokeping_install.1 PKGMESSAGE= ${WRKDIR}/pkg-message SITE_PERL= ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER} DOCDIR= ${PREFIX}/share/doc/smokeping DOC1= CHANGES CONTRIBUTORS COPYING COPYRIGHT README TODO DOC2= EchoPing.pm EchoPingChargen.pm EchoPingDiscard.pm \ EchoPingHttp.pm EchoPingHttps.pm \ EchoPingIcp.pm EchoPingSmtp.pm \ - FPing.pm ParseConfig.pm Smokeping.pm \ + FPing.pm FPing6.pm ParseConfig.pm Smokeping.pm \ base.pm basefork.pm basevars.pm smokeping.cgi \ smokeping smokeping_config smokeping_install ETC1= basepage.html config smokemail config-echoping pre-patch: @${MV} ${WRKSRC}/bin/smokeping.dist ${WRKSRC}/bin/smokeping @${MV} ${WRKSRC}/htdocs/smokeping.cgi.dist ${WRKSRC}/htdocs/smokeping.cgi @${PERL} -pi -e ' \ s|/usr/sepp/bin/perl|${PERL}|; \ s|/usr/sepp/bin/speedy|${PREFIX}/bin/speedy|; \ s|use lib qw\(/usr/pack/rrdtool-1.0.33-to/lib/perl\);\n||; \ s|/home/oetiker/data/projects/AADJ-smokeping/dist/etc|${PREFIX}/etc/smokeping|; \ s|/home/oetiker/data/projects/AADJ-smokeping/dist|${PREFIX}/smokeping|; \ s|/home/oetiker/.smokeping/config|${PREFIX}/etc/smokeping/config|; \ s|/usr/lib/sendmail|/usr/sbin/sendmail|; \ s|/usr/sepp/bin/fping|${PREFIX}/sbin/fping|; \ - s|piddir = /usr/local/smokeping/var|piddir = ${PREFIX}/var/smokeping|; \ + s|dir = /usr/local/smokeping/var|dir = ${PREFIX}/var/smokeping|; \ s|imgcache = /home/oetiker/public_html/.simg|imgcache = ${PREFIX}/smokeping/htdocs/img|; \ s|imgurl = ../.simg|imgurl = /smokeimg|; \ ' \ ${WRKSRC}/bin/smokeping ${WRKSRC}/htdocs/smokeping.cgi ${WRKSRC}/etc/config.dist @${PERL} -p -e ' \ s|%%PREFIX%%|${PREFIX}|g; \ ' \ ${PKGDIR}/pkg-message > ${PKGMESSAGE} do-build: @${RM} ${WRKSRC}/lib/BER.pm @${RM} ${WRKSRC}/lib/SNMP_*.pm + @${RM} ${WRKSRC}/probe-report.patch pre-install: PKG_PREFIX=${PREFIX} ${SH} pkg-install ${PKGNAME} PRE-INSTALL do-install: @${INSTALL_SCRIPT} ${WRKSRC}/bin/smokeping ${PREFIX}/bin .for file in ${MAN1} @${INSTALL_MAN} ${WRKSRC}/doc/${file} ${PREFIX}/man/man1 .endfor @${MKDIR} ${DOCDIR} .for file in ${DOC1} @${INSTALL_DATA} ${WRKSRC}/${file} ${DOCDIR} .endfor .for file in ${DOC2} @${INSTALL_DATA} ${WRKSRC}/doc/${file}.html ${DOCDIR} @${INSTALL_DATA} ${WRKSRC}/doc/${file}.txt ${DOCDIR} .endfor @${MKDIR} ${PREFIX}/etc/smokeping .for file in ${ETC1} @${INSTALL_DATA} ${WRKSRC}/etc/${file}.dist ${PREFIX}/etc/smokeping @if [ ! -f ${PREFIX}/etc/smokeping/${file} ]; then \ ${INSTALL_DATA} ${WRKSRC}/etc/${file}.dist ${PREFIX}/etc/smokeping/${file} ; \ fi .endfor @${MKDIR} ${PREFIX}/smokeping @${CP} -Rp ${WRKSRC}/[hl]* ${PREFIX}/smokeping/ @${MKDIR} ${PREFIX}/var/smokeping @${CHOWN} smokeping:smokeping ${PREFIX}/var/smokeping @${MKDIR} ${PREFIX}/smokeping/htdocs/img @${CHOWN} www:www ${PREFIX}/smokeping/htdocs/img @if [ ! -f ${PREFIX}/etc/rc.d/smokeping.sh ]; then \ ${ECHO} "Installing ${PREFIX}/etc/rc.d/smokeping.sh startup file."; \ ${INSTALL_SCRIPT} ${FILESDIR}/smokeping.sh ${PREFIX}/etc/rc.d/smokeping.sh; \ fi post-install: @${CAT} ${PKGMESSAGE} .include Property changes on: head/net-mgmt/smokeping/Makefile ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.4 \ No newline at end of property +1.5 \ No newline at end of property Index: head/net-mgmt/smokeping/distinfo =================================================================== --- head/net-mgmt/smokeping/distinfo (revision 60506) +++ head/net-mgmt/smokeping/distinfo (revision 60507) @@ -1 +1 @@ -MD5 (smokeping-1.8.tar.gz) = 0be3dccdeea9ce0180ac33c08ce55ee8 +MD5 (smokeping-1.12.tar.gz) = 959dd5b64f067c3f6bfaf26a33f640fa Property changes on: head/net-mgmt/smokeping/distinfo ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.3 \ No newline at end of property +1.4 \ No newline at end of property Index: head/net-mgmt/smokeping/pkg-deinstall =================================================================== --- head/net-mgmt/smokeping/pkg-deinstall (revision 60506) +++ head/net-mgmt/smokeping/pkg-deinstall (revision 60507) @@ -1,23 +1,86 @@ #!/bin/sh +# # $FreeBSD$ # +ask() { + local question default answer + + question=$1 + default=$2 + if [ -z "${PACKAGE_BUILDING}" ]; then + read -p "${question} [${default}]? " answer + fi + if [ x${answer} = x ]; then + answer=${default} + fi + echo ${answer} +} + +yesno() { + local dflt question answer + + question=$1 + dflt=$2 + while :; do + answer=$(ask "${question}" "${dflt}") + case "${answer}" in + [Yy]*) return 0;; + [Nn]*) return 1;; + esac + echo "Please answer yes or no." + done +} + +delete_account() { + local u g home + + u=$1 + g=$2 + if yesno "Do you want me to remove group \"${g}\"" y; then + pw groupdel -n ${g} + echo "Done." + fi + if yesno "Do you want me to remove user \"${u}\"" y; then + eval home=~${u} + pw userdel -n ${u} + echo "Done." + if [ -d "${home}" ]; then + echo "Please remember to check if there's any unsent mail left" + echo "in the home directory \"${home}\"" + fi + + fi +} + if [ -f ${PKG_PREFIX}/var/smokeping/smokeping.pid ]; then if [ -x ${PKG_PREFIX}/etc/rc.d/smokeping.sh ]; then ${PKG_PREFIX}/etc/rc.d/smokeping.sh stop > /dev/null fi rm ${PKG_PREFIX}/var/smokeping/smokeping.pid fi if [ "$2" != "POST-DEINSTALL" ]; then exit 0 fi -if [ -d ${PKG_PREFIX}/smokeping ]; then - echo "----------------------------------------------------------------" - echo "To delete your custom SmokePing configuration and all collected" - echo "data permanently, use 'rm -R ${PKG_PREFIX}/smokeping'" - echo "----------------------------------------------------------------" -fi +if [ ! -n "$BATCH" ]; then -exit 0 + if [ -d ${PKG_PREFIX}/etc/smokeping ]; then + echo "You have some custom SmokePing configuration in \"${PKG_PREFIX}/etc/smokeping/\"." + if yesno "Would you like me to remove it" y; then + rm -R ${PKG_PREFIX}/etc/smokeping + echo "Done." + fi + fi + + if [ -d ${PKG_PREFIX}/var/smokeping ]; then + echo "You have some collected data in \"${PKG_PREFIX}/var/smokeping/\"." + if yesno "Would you like me to remove it" y; then + rm -R ${PKG_PREFIX}/var/smokeping + echo "Done." + fi + fi + + delete_account smokeping smokeping +fi Property changes on: head/net-mgmt/smokeping/pkg-deinstall ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.2 \ No newline at end of property +1.3 \ No newline at end of property Index: head/net-mgmt/smokeping/pkg-install =================================================================== --- head/net-mgmt/smokeping/pkg-install (revision 60506) +++ head/net-mgmt/smokeping/pkg-install (revision 60507) @@ -1,118 +1,121 @@ #! /bin/sh +# +# $FreeBSD$ +# ask() { local question default answer question=$1 default=$2 if [ -z "${PACKAGE_BUILDING}" ]; then read -p "${question} [${default}]? " answer fi if [ x${answer} = x ]; then answer=${default} fi echo ${answer} } yesno() { local dflt question answer question=$1 dflt=$2 while :; do answer=$(ask "${question}" "${dflt}") case "${answer}" in [Yy]*) return 0;; [Nn]*) return 1;; esac echo "Please answer yes or no." done } make_account() { local u g gcos homeopt home u=$1 g=$2 gcos=$3 homeopt=${4:+"-d $4"} if pw group show "${g}" >/dev/null 2>&1; then echo "You already have a group \"${g}\", so I will use it." else echo "You need a group \"${g}\"." if which -s pw && yesno "Would you like me to create it" y; then pw groupadd ${g} || exit echo "Done." else echo "Please create it, and try again." if ! grep -q "^${u}:" /etc/passwd; then echo "While you're at it, please create a user \"${u}\" too," echo "with a default group of \"${g}\"." fi exit 1 fi fi if pw user show "${u}" >/dev/null 2>&1; then echo "You already have a user \"${u}\", so I will use it." else echo "You need a user \"${u}\"." if which -s pw && yesno "Would you like me to create it" y; then pw useradd ${u} -g ${g} -h - ${homeopt} \ -s /nonexistent -c "${gcos}" || exit echo "Done." else echo "Please create it, and try again." exit 1 fi fi if [ x"$homeopt" = x ]; then eval home=~${u} if [ ! -d "${home}" ]; then if yesno \ "Would you like me to create ${u}'s home directory (${home})" y then (umask 77 && \ mkdir -p ${home}) || exit chown -R ${u}:${g} ${home} || exit else echo "Please create it, and try again." exit 1 fi fi fi } if [ "$2" != "PRE-INSTALL" ]; then exit 0 fi USER=www GROUP=${USER} UID=80 GID=${UID} if ! pw groupshow "${GROUP}" 2>/dev/null 1>&2; then if pw groupadd ${GROUP} -g ${GID}; then echo "Added group \"${GROUP}\"." else echo "Adding group \"${GROUP}\" failed..." exit 1 fi fi if ! pw usershow "${USER}" 2>/dev/null 1>&2; then if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \ -s "/sbin/nologin" -d "/nonexistent" \ -c "World Wide Web Owner"; \ then echo "Added user \"${USER}\"." else echo "Adding user \"${USER}\" failed..." exit 1 fi fi make_account smokeping smokeping "SmokePing Daemon" "/nonexistent" Property changes on: head/net-mgmt/smokeping/pkg-install ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.1 \ No newline at end of property +1.2 \ No newline at end of property Index: head/net-mgmt/smokeping/pkg-plist =================================================================== --- head/net-mgmt/smokeping/pkg-plist (revision 60506) +++ head/net-mgmt/smokeping/pkg-plist (revision 60507) @@ -1,80 +1,83 @@ bin/smokeping etc/rc.d/smokeping.sh @unexec if cmp -s %D/etc/smokeping/basepage.html %D/etc/smokeping/basepage.html.dist; then rm -f %D/etc/smokeping/basepage.html; fi etc/smokeping/basepage.html.dist @exec [ -f %B/basepage.html ] || cp %B/%f %B/basepage.html @unexec if cmp -s %D/etc/smokeping/config %D/etc/smokeping/config.dist; then rm -f %D/etc/smokeping/config; fi etc/smokeping/config.dist @exec [ -f %B/config ] || cp %B/%f %B/config @unexec if cmp -s %D/etc/smokeping/smokemail %D/etc/smokeping/smokemail.dist; then rm -f %D/etc/smokeping/smokemail; fi etc/smokeping/smokemail.dist @exec [ -f %B/smokemail ] || cp %B/%f %B/smokemail @unexec if cmp -s %D/etc/smokeping/config-echoping %D/etc/smokeping/config-echoping.dist; then rm -f %D/etc/smokeping/config-echoping; fi etc/smokeping/config-echoping.dist @exec [ -f %B/config-echoping ] || cp %B/%f %B/config-echoping share/doc/smokeping/CHANGES share/doc/smokeping/CONTRIBUTORS share/doc/smokeping/COPYING share/doc/smokeping/COPYRIGHT share/doc/smokeping/README share/doc/smokeping/TODO share/doc/smokeping/EchoPing.pm.html share/doc/smokeping/EchoPing.pm.txt share/doc/smokeping/EchoPingChargen.pm.html share/doc/smokeping/EchoPingChargen.pm.txt share/doc/smokeping/EchoPingDiscard.pm.html share/doc/smokeping/EchoPingDiscard.pm.txt share/doc/smokeping/EchoPingHttp.pm.html share/doc/smokeping/EchoPingHttp.pm.txt share/doc/smokeping/EchoPingHttps.pm.html share/doc/smokeping/EchoPingHttps.pm.txt share/doc/smokeping/EchoPingIcp.pm.html share/doc/smokeping/EchoPingIcp.pm.txt share/doc/smokeping/EchoPingSmtp.pm.html share/doc/smokeping/EchoPingSmtp.pm.txt share/doc/smokeping/FPing.pm.html share/doc/smokeping/FPing.pm.txt +share/doc/smokeping/FPing6.pm.html +share/doc/smokeping/FPing6.pm.txt share/doc/smokeping/ParseConfig.pm.html share/doc/smokeping/ParseConfig.pm.txt share/doc/smokeping/Smokeping.pm.html share/doc/smokeping/Smokeping.pm.txt share/doc/smokeping/base.pm.html share/doc/smokeping/base.pm.txt share/doc/smokeping/basefork.pm.html share/doc/smokeping/basefork.pm.txt share/doc/smokeping/basevars.pm.html share/doc/smokeping/basevars.pm.txt share/doc/smokeping/smokeping.cgi.html share/doc/smokeping/smokeping.cgi.txt share/doc/smokeping/smokeping.html share/doc/smokeping/smokeping.txt share/doc/smokeping/smokeping_config.html share/doc/smokeping/smokeping_config.txt share/doc/smokeping/smokeping_install.html share/doc/smokeping/smokeping_install.txt smokeping/htdocs/smokeping.cgi smokeping/lib/Smokeping.pm smokeping/lib/probes/FPing.pm +smokeping/lib/probes/FPing6.pm smokeping/lib/probes/base.pm smokeping/lib/probes/EchoPing.pm smokeping/lib/probes/EchoPingChargen.pm smokeping/lib/probes/EchoPingDiscard.pm smokeping/lib/probes/EchoPingHttp.pm smokeping/lib/probes/EchoPingHttps.pm smokeping/lib/probes/EchoPingIcp.pm smokeping/lib/probes/EchoPingSmtp.pm smokeping/lib/probes/basefork.pm smokeping/lib/probes/basevars.pm smokeping/lib/ISG/ParseConfig.pm @unexec rmdir %D/etc/smokeping || true @exec mkdir -p %D/smokeping/htdocs/img; chown www:www %D/smokeping/htdocs/img @unexec rm -rf %D/smokeping/htdocs/img @exec mkdir -p %D/var/smokeping @exec chown smokeping:smokeping %D/var/smokeping @unexec rmdir %D/var/smokeping 2>/dev/null || true @dirrm smokeping/htdocs @dirrm smokeping/lib/probes @dirrm smokeping/lib/ISG @dirrm smokeping/lib @dirrm share/doc/smokeping @unexec rmdir %D/smokeping 2>/dev/null || true Property changes on: head/net-mgmt/smokeping/pkg-plist ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.2 \ No newline at end of property +1.3 \ No newline at end of property