Forráskód Böngészése

be more descriptive and less confusing during install

Ralf S. Engelschall 21 éve
szülő
commit
8c33f4be15
2 módosított fájl, 38 hozzáadás és 12 törlés
  1. 19 6
      mysql/mysql.spec
  2. 19 6
      mysql41/mysql41.spec

+ 19 - 6
mysql/mysql.spec

@@ -40,7 +40,7 @@ Class:        BASE
 Group:        Database
 License:      GPL
 Version:      %{V_opkg}
-Release:      20040910
+Release:      20040913
 
 #   package options
 %option       with_server    yes
@@ -240,15 +240,28 @@ AutoReqProv:  no
     if [ $1 -eq 1 ]; then
         #   after install, create initial database
         $RPM_INSTALL_PREFIX/bin/mysql_install_db \
-            --defaults-file=$RPM_INSTALL_PREFIX/etc/mysql/my.cnf
+            --defaults-file=$RPM_INSTALL_PREFIX/etc/mysql/my.cnf >/dev/null 2>&1
         chown %{l_rusr}:%{l_rgrp} \
             $RPM_INSTALL_PREFIX/etc/mysql/my.cnf \
             $RPM_INSTALL_PREFIX/etc/mysql/my.pwd
         chown -R %{l_rusr}:%{l_rgrp} $RPM_INSTALL_PREFIX/var/mysql/*
-        ( echo "The MySQL package includes automated maintenance procedures"
-          echo "that require administrator access to the database. For this"
-          echo "to work you must keep a copy (plain text) of the administrator"
-          echo "account in '$RPM_INSTALL_PREFIX/etc/mysql/my.pwd'."
+        ( echo "An initial MySQL DB was created. The owner of the database"
+          echo "is the DB user 'root'. Its initial password is empty."
+          echo "After starting MySQL with..."
+          echo ""
+          echo "  \$ $RPM_INSTALL_PREFIX/etc/rc mysql start"
+          echo ""
+          echo "...you should change the password as soon as possible with:"
+          echo ""
+          echo "  \$ $RPM_INSTALL_PREFIX/bin/mysqladmin \\ "
+          echo "    -u root password '<new-password>'"
+          echo ""
+          echo "Additionally, because the MySQL package includes automated"
+          echo "maintenance procedures that require administrator access to"
+          echo "the database, you must maintain a (plain text) copy of the"
+          echo "administrator account name and password:"
+          echo ""
+          echo "  \$ vi $RPM_INSTALL_PREFIX/etc/mysql/my.pwd"
         ) | %{l_rpmtool} msg -b -t notice
     fi
     if [ $1 -eq 2 ]; then

+ 19 - 6
mysql41/mysql41.spec

@@ -40,7 +40,7 @@ Class:        PLUS
 Group:        Database
 License:      GPL
 Version:      %{V_opkg}
-Release:      20040910
+Release:      20040913
 
 #   package options
 %option       with_server    yes
@@ -250,15 +250,28 @@ Provides:     mysql = %{version}-%{release}
     if [ $1 -eq 1 ]; then
         #   after install, create initial database
         $RPM_INSTALL_PREFIX/bin/mysql_install_db \
-            --defaults-file=$RPM_INSTALL_PREFIX/etc/mysql/my.cnf
+            --defaults-file=$RPM_INSTALL_PREFIX/etc/mysql/my.cnf >/dev/null 2>&1
         chown %{l_rusr}:%{l_rgrp} \
             $RPM_INSTALL_PREFIX/etc/mysql/my.cnf \
             $RPM_INSTALL_PREFIX/etc/mysql/my.pwd
         chown -R %{l_rusr}:%{l_rgrp} $RPM_INSTALL_PREFIX/var/mysql/*
-        ( echo "The MySQL package includes automated maintenance procedures"
-          echo "that require administrator access to the database. For this"
-          echo "to work you must keep a copy (plain text) of the administrator"
-          echo "account in '$RPM_INSTALL_PREFIX/etc/mysql/my.pwd'."
+        ( echo "An initial MySQL DB was created. The owner of the database"
+          echo "is the DB user 'root'. Its initial password is empty."
+          echo "After starting MySQL with..."
+          echo ""
+          echo "  \$ $RPM_INSTALL_PREFIX/etc/rc mysql start"
+          echo ""
+          echo "...you should change the password as soon as possible with:"
+          echo ""
+          echo "  \$ $RPM_INSTALL_PREFIX/bin/mysqladmin \\ "
+          echo "    -u root password '<new-password>'"
+          echo ""
+          echo "Additionally, because the MySQL package includes automated"
+          echo "maintenance procedures that require administrator access to"
+          echo "the database, you must maintain a (plain text) copy of the"
+          echo "administrator account name and password:"
+          echo ""
+          echo "  \$ vi $RPM_INSTALL_PREFIX/etc/mysql/my.pwd"
         ) | %{l_rpmtool} msg -b -t notice
     fi
     if [ $1 -eq 2 ]; then