瀏覽代碼

adding debconf question about creating ser database to debian package

Pavel Kasparek 17 年之前
父節點
當前提交
f693acd38a
共有 3 個文件被更改,包括 21 次插入0 次删除
  1. 5 0
      pkg/debian/ser-oob.config
  2. 8 0
      pkg/debian/ser-oob.postinst
  3. 8 0
      pkg/debian/ser-oob.templates

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

@@ -45,3 +45,8 @@ db_go
 
 db_input medium ser-oob/DBMODE || true
 db_go
+
+db_input medium ser-oob/CREATE_DB || true
+db_go
+
+

+ 8 - 0
pkg/debian/ser-oob.postinst

@@ -195,6 +195,14 @@ modparam("usrloc", "db_mode", $RET)
 +++
 fi
 
+db_get ser-oob/CREATE_DB
+if [ "$RET" = "true" ] ; then
+  db_set ser-oob/CREATE_DB false
+  echo "Creating ser database"
+  /usr/sbin/ser_mysql.sh create
+fi
+
+
 fi # if changing config
 
 echo ""

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

@@ -132,3 +132,11 @@ Description: usrloc database mode
  avoid it).
  .
  Enter "!" to not modify this option.
+
+Template: ser-oob/CREATE_DB
+Type: boolean
+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.
+