Ver Fonte

adding debconf question for the mysql password for creating ser db

Pavel Kasparek há 17 anos atrás
pai
commit
30adb0bbd8
3 ficheiros alterados com 18 adições e 1 exclusões
  1. 5 0
      pkg/debian/ser-oob.config
  2. 4 1
      pkg/debian/ser-oob.postinst
  3. 9 0
      pkg/debian/ser-oob.templates

+ 5 - 0
pkg/debian/ser-oob.config

@@ -49,4 +49,9 @@ db_go
 db_input medium ser-oob/CREATE_DB || true
 db_go
 
+db_get ser-oob/CREATE_DB
+if [ "$RET" = "true" ]; then
+  db_input medium ser-oob/MYSQLPASS || true
+  db_go
+fi
 

+ 4 - 1
pkg/debian/ser-oob.postinst

@@ -198,8 +198,11 @@ fi
 db_get ser-oob/CREATE_DB
 if [ "$RET" = "true" ] ; then
   db_set ser-oob/CREATE_DB false
+  db_get ser-oob/MYSQLPASS
+  PASS="$RET"
+  db_set ser-oob/MYSQLPASS ""
   echo "Creating ser database"
-  /usr/sbin/ser_mysql.sh create
+  /usr/sbin/ser_mysql.sh create -q$PASS
 fi
 
 

+ 9 - 0
pkg/debian/ser-oob.templates

@@ -139,4 +139,13 @@ Default: false
 Description: Create ser database
  Do you want to create ser database 'ser' with default users 'ser' and 'serro' on Mysql
  server running on localhost ? You should use this option when doing first-time installation only.
+ .
+ Note: you can run the script creation script manually by calling 'ser_mysql.sh'.
+
+Template: ser-oob/MYSQLPASS
+Type: string
+Default:
+Description: Mysql root password
+ Please enter your Mysql root password. It will be used to create the ser database. You can leave it empty
+ to use empty password.