瀏覽代碼

adding debconf question for the mysql password for creating ser db

Pavel Kasparek 17 年之前
父節點
當前提交
30adb0bbd8
共有 3 個文件被更改,包括 18 次插入1 次删除
  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_input medium ser-oob/CREATE_DB || true
 db_go
 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
 db_get ser-oob/CREATE_DB
 if [ "$RET" = "true" ] ; then
 if [ "$RET" = "true" ] ; then
   db_set ser-oob/CREATE_DB false
   db_set ser-oob/CREATE_DB false
+  db_get ser-oob/MYSQLPASS
+  PASS="$RET"
+  db_set ser-oob/MYSQLPASS ""
   echo "Creating ser database"
   echo "Creating ser database"
-  /usr/sbin/ser_mysql.sh create
+  /usr/sbin/ser_mysql.sh create -q$PASS
 fi
 fi
 
 
 
 

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

@@ -139,4 +139,13 @@ Default: false
 Description: Create ser database
 Description: Create ser database
  Do you want to create ser database 'ser' with default users 'ser' and 'serro' on Mysql
  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.
  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.