Better postinst instructions: using webapp.eclass postinst support
authorEldad Zack <eldad@gentoo.org>
Thu, 14 Oct 2004 05:05:33 +0000 (05:05 +0000)
committerEldad Zack <eldad@gentoo.org>
Thu, 14 Oct 2004 05:05:33 +0000 (05:05 +0000)
net-analyzer/cacti/ChangeLog
net-analyzer/cacti/Manifest
net-analyzer/cacti/cacti-0.8.6b.ebuild
net-analyzer/cacti/files/postinstall-en.txt [new file with mode: 0644]

index c0eef924fd80081a90c9a6f85eadabf3a5f81840..18761d06dcf835770db6b3249ce176d56fd0e864 100644 (file)
@@ -1,6 +1,10 @@
 # ChangeLog for net-analyzer/cacti
 # Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/cacti/ChangeLog,v 1.31 2004/10/14 04:41:29 eldad Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/cacti/ChangeLog,v 1.32 2004/10/14 05:05:33 eldad Exp $
+
+  14 Oct 2004; Eldad Zack <eldad@gentoo.org> +files/postinstall-en.txt,
+  cacti-0.8.6b.ebuild:
+  Better postinst instructions: using webapp.eclass postinst support
 
 *cacti-0.8.6b (14 Oct 2004)
 
index 8bfc53cac648fad069a8b59edfa012fffeb1f47f..571b5d4e7a911d34138a231509480cc8036b7178 100644 (file)
@@ -2,10 +2,11 @@
 Hash: SHA1
 
 MD5 3c5429026810fd126265aac06c4cdd93 cacti-0.8.5a-r1.ebuild 4654
-MD5 0d8276b397d969223674bd76dc73cc9c cacti-0.8.6b.ebuild 4537
-MD5 f1f13883b56b84b99e7e1d05b091b9e4 ChangeLog 4159
+MD5 759fc5dc4f65edbc8034298a120d1305 cacti-0.8.6b.ebuild 1571
+MD5 12ee53e1577c53542a20d942b4f47452 ChangeLog 4324
 MD5 9683bb7323c40d69b48d54ad0eb169ed metadata.xml 221
 MD5 7cc300afca6489e25dbf3da4fc8f63c5 cacti-0.8.5a-r2.ebuild 4218
+MD5 7e6cb83dce0d1be3017fb7761f4a00bc files/postinstall-en.txt 2236
 MD5 5415dc0df13fd1528eb90acce7f44989 files/digest-cacti-0.8.6b 65
 MD5 9921205d0e13d5948104d5de2e58d3ee files/cacti-0.8.5a-sql-injection.patch 625
 MD5 44637d48edf68b76a472c70817449cd6 files/digest-cacti-0.8.5a-r1 64
@@ -13,7 +14,7 @@ MD5 44637d48edf68b76a472c70817449cd6 files/digest-cacti-0.8.5a-r2 64
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.2.6 (GNU/Linux)
 
-iD8DBQFBbgUdT+MN7JbqCpMRAqp7AJ9KzK/P67iXOBIiAjZGMuOHYjy2SACeLKs+
-b1n0oBtfCi0n1FFalHhDg2E=
-=oXLP
+iD8DBQFBbgkHT+MN7JbqCpMRAowZAJ0a7NN/DFdmCkvzAvfvjdkz55GmUgCffJGb
+gP4gs7ShGj/gf3hYbOQfRUI=
+=Eqs/
 -----END PGP SIGNATURE-----
index 49cfe47ea3205a4ebfa538e4e2485988f026f6ac..4a181fb9ef3d0f1be91da2c352f3358adb3eb97d 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/cacti/cacti-0.8.6b.ebuild,v 1.1 2004/10/14 04:41:29 eldad Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/cacti/cacti-0.8.6b.ebuild,v 1.2 2004/10/14 05:05:33 eldad Exp $
 
 inherit eutils webapp
 
@@ -67,73 +67,8 @@ src_install() {
        dodir ${D}${MY_HTDOCSDIR}
        cp -r . ${D}${MY_HTDOCSDIR}
 
+       webapp_postinst_txt en ${FILESDIR}/postinstall-en.txt
+
        webapp_src_install
 }
 
-pkg_postinst() {
-       local webserver_root=${VHOST_ROOT}/${VHOST_HTDOCS_INSECURE}
-
-       einfo "Install Notes: Assuming your webserver is at ${webserver_root},"
-       einfo "and that the webserver group is ${VHOST_DEFAULT_GID}."
-       einfo
-       einfo "New Install"
-       einfo
-       einfo "1. Create the new cacti database"
-       einfo "  shell> mysqladmin --user=root create cacti"
-       einfo "2. Import the default cacti database:"
-       einfo "  shell> mysql cacti < ${webserver_root}/${PN}/cacti.sql"
-       einfo "3. Optional: Create a MySQL username and password for cacti."
-       einfo "  shell> mysql --user=root mysql"
-       einfo "  mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'somepassword';"
-       einfo "  mysql> flush privileges;"
-       einfo "4. Copy ${webserver_root}/${PN}/include/config-sample.php to config.php."
-       einfo " + Modify the MySQL user, password and database for your"
-       einfo "   cacti configuration."
-       einfo "         \$database_default = \"cacti\";"
-       einfo "         \$database_hostname = \"localhost\";"
-       einfo "         \$database_username = \"cactiuser\";"
-       einfo "         \$database_password = \"cacti\";"
-       einfo "6. Point your web browser to:  http://your-server/cacti/"
-       einfo " Make sure to fill in all of the path variables carefully and"
-       einfo " correctly on the following screen."
-       einfo
-       einfo "Upgrading"
-       einfo
-       einfo "Before cacti works you must upgrade the cacti database:"
-       einfo "1. Backup the old cacti database:"
-       einfo "  shell> mysqlhotcopy --suffix=_old cacti"
-       einfo "2. Drop the old cacti database:"
-       einfo "  shell> mysqladmin -p drop cacti"
-       einfo "3. Create the new cacti database"
-       einfo "  shell> mysqladmin --user=root create cacti"
-       einfo "4. Import the default cacti database:"
-       einfo "  shell> mysql cacti < ${webserver_root}/${PN}/cacti.sql"
-       einfo "5. Edit ${webserver_root}/${PN}/include/config.php."
-       einfo " + Modify the MySQL user, password and database for your"
-       einfo "   cacti configuration."
-       einfo "         \$database_default = \"cacti\";"
-       einfo "         \$database_hostname = \"localhost\";"
-       einfo "         \$database_username = \"cactiuser\";"
-       einfo "         \$database_password = \"cacti\";"
-       einfo "6. Point your web browser to:  http://your-server/cacti/"
-       einfo " Select \"Upgrade\"."
-       einfo " Make sure to fill in all of the path variables carefully and"
-       einfo " correctly on the following screen."
-       einfo "7. Test your upgraded installation. When all is fine you can"
-       einfo "drop the cacti_old database like so:"
-       einfo "  shell> mysqladmin -p drop cacti_old"
-       einfo
-       einfo "Either new or upgrading, make sure you have a cron job -"
-       einfo "Add this line to your /etc/crontab file:"
-       einfo "   */5 * * * * ${VHOST_DEFAULT_GID} php ${webserver_root}/${PN}/poller.php > /dev/null 2>&1"
-       einfo
-       einfo "FINALLY, you must have these settings in your php.ini:"
-       einfo " register_globals = On"
-       einfo " register_argc_argv = On"
-       einfo
-       ewarn "Note that you should use poller.php as the cronjob"
-       ewarn "instead of cmd.php (as it was with earlier version)"
-       ewarn "to enable you to switch between cmd.php and cactid."
-
-       webapp_pkg_postinst
-}
diff --git a/net-analyzer/cacti/files/postinstall-en.txt b/net-analyzer/cacti/files/postinstall-en.txt
new file mode 100644 (file)
index 0000000..c66b8a7
--- /dev/null
@@ -0,0 +1,70 @@
+
+New Install
+
+1. Create the new cacti database
+  shell> mysqladmin --user=root create cacti
+2. Import the default cacti database:
+  shell> mysql cacti < ${MY_INSTALLDIR}/cacti.sql
+3. Optional: Create a MySQL username and password for cacti.
+  shell> mysql --user=root mysql
+  mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'somepassword';
+  mysql> flush privileges;
+4. Copy ${MY_INSTALLDIR}/include/config-sample.php to config.php.
+ + Modify the MySQL user, password and database for your
+   cacti configuration.
+       \$database_default = "cacti";
+       \$database_hostname = "localhost";
+       \$database_username = "cactiuser";
+       \$database_password = "cacti";
+6. Point your web browser to:  http://your-server/cacti/
+ Make sure to fill in all of the path variables carefully and
+ correctly on the following screen.
+
+
+Upgrading
+
+Before cacti works you must upgrade the cacti database:
+1. Backup the old cacti database:
+  shell> mysqlhotcopy --suffix=_old cacti
+2. Drop the old cacti database:
+  shell> mysqladmin -p drop cacti
+3. Create the new cacti database
+  shell> mysqladmin --user=root create cacti
+4. Import the default cacti database:
+  shell> mysql cacti < ${MY_INSTALLDIR}/cacti.sql
+5. Edit ${MY_INSTALLDIR}/include/config.php.
+ + Modify the MySQL user, password and database for your
+   cacti configuration.
+       \$database_default = "cacti";
+       \$database_hostname = "localhost";
+       \$database_username = "cactiuser";
+       \$database_password = "cacti";
+6. Point your web browser to:  http://your-server/cacti/
+ Select "Upgrade".
+ Make sure to fill in all of the path variables carefully and
+ correctly on the following screen.
+7. Test your upgraded installation. When all is fine you can
+drop the cacti_old database like so:
+  shell> mysqladmin -p drop cacti_old
+
+
+Cronjob
+
+Either new or upgrading, make sure you have a cron job - Add this line to 
+your /etc/crontab file:
+
+   */5 * * * * ${VHOST_SERVER_GID} php ${MY_INSTALLDIR}/poller.php > /dev/null 2>&1
+
+Note that you should use poller.php as the cronjob instead of cmd.php (as it was with 
+earlier versions) to enable you to switch between cmd.php and cactid.
+
+
+PHP
+
+FINALLY, you must have these settings in your php.ini:
+
+       register_globals = On
+       register_argc_argv = On
+
+
+