Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iml-backup
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IML Open Source
iml-backup
Commits
6e2facbf
Commit
6e2facbf
authored
1 year ago
by
Axel Hahn
Browse files
Options
Downloads
Patches
Plain Diff
insert usage of ini.class.sh
parent
f65defaf
Branches
Branches containing commit
No related tags found
1 merge request
!129
Db Profiles
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
includes/dbdetect.class.sh
+1
-1
1 addition, 1 deletion
includes/dbdetect.class.sh
includes/dbdetect_validate_profile.ini
+52
-0
52 additions, 0 deletions
includes/dbdetect_validate_profile.ini
with
53 additions
and
1 deletion
includes/dbdetect.class.sh
+
1
−
1
View file @
6e2facbf
...
@@ -80,7 +80,7 @@ function dbdetect.validate(){
...
@@ -80,7 +80,7 @@ function dbdetect.validate(){
local
_config
=
"
${
1
:-
$DBD_INIFILE
}
"
local
_config
=
"
${
1
:-
$DBD_INIFILE
}
"
# show errors in profile ini files
# show errors in profile ini files
ini.validate
"
$_config
"
"
$(
dirname
"
$0
"
)
/includes/dbdetect_validate_profile
_
ini
.sh
"
0
&&
dbdetect._wd
"OK: Validation of '
$_config
' successful"
ini.validate
"
$_config
"
"
$(
dirname
"
$0
"
)
/includes/dbdetect_validate_profile
.
ini"
1
&&
dbdetect._wd
"OK: Validation of '
$_config
'
was
successful"
}
}
# check if the requirements for a database match
# check if the requirements for a database match
...
...
This diff is collapsed.
Click to expand it.
includes/dbdetect_validate_profile.ini
0 → 100644
+
52
−
0
View file @
6e2facbf
# ----------------------------------------------------------------------
#
# VALIDATE PROFILE INI
#
# ----------------------------------------------------------------------
# IDEA
[style]
section
=
"^[a-zA-Z0-9_]*$"
key
=
"^[a-zA-Z0-9_
\-
]*$"
# ----------------------------------------------------------------------
# section names
#
# SYNTAX:
# comma separated list of sections
# ----------------------------------------------------------------------
[sections]
must
=
"detect,set"
can
=
""
# ----------------------------------------------------------------------
# validate keys in sections
#
# SYNTAX:
# <section> .<key> = "<VALIDATION_TYPE>[:<VALIDATION_VALUE>]"
# VALIDATION_TYPE:
# - INTEGER
# - REGEX:<REGEX_TO_VALIDATE>
# - ONEOF:<VALUE1[,<VALUE_N>]>
# ----------------------------------------------------------------------
[varsMust]
; detect.tcp-port = "INTEGER"
[varsCan]
detect.binary
=
"REGEX:.*"
detect.process
=
detect.tcp-port
=
"INTEGER"
detect.tcp-target
=
"REGEX:.*"
detect.tcp-process
=
detect.type
=
"ONEOF:sqlite"
detect.file
[]
=
set.su
=
set.dbuser
=
set.dbpassword
=
set.env
=
set.params
=
# ----------------------------------------------------------------------
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment