--- rpms/smeserver-cacti/contribs8/smeserver-cacti.spec 2013/02/12 04:16:59 1.1 +++ rpms/smeserver-cacti/contribs8/smeserver-cacti.spec 2013/10/16 03:07:57 1.2 @@ -1,11 +1,11 @@ -# $Id: smeserver-cacti.spec,v 1.3 2008/11/25 16:20:19 slords Exp $ +# $Id: smeserver-cacti.spec,v 1.1 2013/02/12 04:16:59 unnilennium Exp $ # Authority: nocvs # Name: Michel Van hees Summary: Cacti for smeserver %define name smeserver-cacti Name: %{name} -%define version 0.8.7a +%define version 0.8.8b %define release 1 Version: %{version} Release: %{release}%{?dist} @@ -16,10 +16,15 @@ Source: %{name}-%{version}.tar.gz BuildRoot: /var/tmp/e-smith-buildroot BuildRequires: e-smith-devtools BuildArchitectures: noarch -Requires: smeserver-release >= 7, rrdtool >= 1 +Requires: smeserver-release >=8 , rrdtool >= 1 +Requires: cacti-0.8.8b-2.el5 AutoReqProv: no %changelog +* Tue Oct 15 2013 Jean-Philippe Pialasse 0.8.8b.sme +- initial release for SME 8 +- use el5 repo cacti + * Tue Dec 4 2007 Michel Van hees - Update contrib to 0.8.7a version - Adding access limitation @@ -52,98 +57,48 @@ echo "%doc COPYING" >> %{name}- rm -rf $RPM_BUILD_ROOT %pre -/sbin/e-smith/db accounts set cacti reserved +#/sbin/e-smith/db accounts set cacti reserved %preun %post -/sbin/e-smith/db configuration set cacti service -/sbin/e-smith/db configuration setprop cacti access private +#/sbin/e-smith/db configuration set cacti service +#/sbin/e-smith/db configuration setprop cacti access private -/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf -/sbin/e-smith/expand-template /opt/cacti/include/config.php -service httpd-e-smith sigusr1 - - -cactiVersion=`mysql cacti_sme -N -s -e"select * from version"` -case "$cactiVersion" in - 0.8.6j) - echo "" - echo "Upgrade process !!!!!!" - mysql cacti_sme < /opt/cacti/cacti_upg086j.sql - rm -f /opt/cacti/cacti_sme.sql - rm -f /opt/cacti/cacti_upg086j.sql - echo "Upgrade complete ..." - echo "" - ;; - 0.8.7a) - # Shoul not be here for the moment - ;; - *) - # Fresh install - echo "" - echo "fresh install..." - mysqladmin create cacti_sme - mysql cacti_sme < /opt/cacti/cacti_sme.sql - rm -Rf /opt/cacti/install - rm -f /opt/cacti/cacti_sme.sql - rm -f /opt/cacti/cacti_upg086j.sql - echo "Install complete ..." - echo "" -esac - -case "${LANG:0:2}" in - fr) - echo "" - echo "Vous pouvez maintenant acceder à cacti via un browser web de la maniere suivante https://nom_server/cacti" - echo "Vous pourrez vous loger sous admin avec comme mot de pass admin." - echo "Si vous mettez à jour, le mot de passe admin n'aura pas changer!" - echo "" - echo "Attention !!!!!" - echo "Cacti est limité en accès au réseau interne, donc pas depuis internet" - echo "Vous pouvez changer cette option avec les commandes :" - echo "db configuration setprop cacti access public" - echo "signal-events console-save" - echo "" - ;; - *) - echo "" - echo "Now you can access cacti though your browser at https://server_name/cacti" - echo "You can connect using login admin and password admin." - echo "If you update a 2.1 version of this contribs, admin password don't change!" - echo "" - echo "BEWARE !!!" - echo "Cacti is now limited to internal network, so it couldn't be access from internet" - echo "You can change this with the following command :" - echo "db configuration setprop cacti access public" - echo "signal-events console-save" - echo "" +#/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf +#/sbin/e-smith/expand-template /opt/cacti/include/config.php +#service httpd-e-smith sigusr1 + + +#cactiVersion=`mysql cacti_sme -N -s -e"select * from version"` +#case "$cactiVersion" in +# 0.8.6j) +# echo "" +# echo "Upgrade process !!!!!!" +# mysql cacti_sme < /opt/cacti/cacti_upg086j.sql +# rm -f /opt/cacti/cacti_sme.sql +# rm -f /opt/cacti/cacti_upg086j.sql +# echo "Upgrade complete ..." +# echo "" +# ;; +# 0.8.7a) +# # Shoul not be here for the moment +# ;; +# *) +# # Fresh install +# echo "" +# echo "fresh install..." +# mysqladmin create cacti_sme +# mysql cacti_sme < /opt/cacti/cacti_sme.sql +# rm -Rf /opt/cacti/install +# rm -f /opt/cacti/cacti_sme.sql +# rm -f /opt/cacti/cacti_upg086j.sql +# echo "Install complete ..." +# echo "" +#esac - ;; -esac %postun -/sbin/e-smith/db accounts delete cacti -/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf -service httpd-e-smith sigusr1 -if [ $1 = 0 ] ; then -# action to been done if remove -case "${LANG:0:2}" in - fr) - echo "" - echo "La base de donnée ne sera pas effacé" - echo "Si vous voulez supprimer la base de donnée lancé la commande suivante :" - echo "mysqladmin drop cacti_sme" - ;; - *) - echo "" - echo "Database will not be removed" - echo "If you want to remove completly the database launch" - echo "mysqladmin drop cacti_sme" - ;; -esac - -fi %files -f %{name}-%{version}-filelist %defattr(-,root,root)