added group and user set[uid|gid] capability at unit definition level
This commit is contained in:
2
test/components/dependent_test.bash
Executable file
2
test/components/dependent_test.bash
Executable file
@@ -0,0 +1,2 @@
|
||||
echo "dependent test"
|
||||
exit $?
|
||||
11
test/components/independent_test_1.bash
Executable file
11
test/components/independent_test_1.bash
Executable file
@@ -0,0 +1,11 @@
|
||||
whoami
|
||||
id
|
||||
|
||||
touch /home/bagira/testfile
|
||||
|
||||
stat /home/bagira/testfile
|
||||
|
||||
#dialog --stdout --title "Interact with me!" \
|
||||
# --backtitle "This is user interaction." \
|
||||
# --yesno "Yes: pass, No: fail" 7 60
|
||||
exit $?
|
||||
2
test/components/independent_test_2.bash
Executable file
2
test/components/independent_test_2.bash
Executable file
@@ -0,0 +1,2 @@
|
||||
echo "independent test 2 output"
|
||||
exit $?
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"execution_context_override": true,
|
||||
"execution_context": "/home/bagira/development/internal/examplar/test",
|
||||
"units_path": "units/all_test.units",
|
||||
"plan_path": "plans/test.plan",
|
||||
"units_path": "units/",
|
||||
"plan_path": "plans/atomic.plan",
|
||||
"config_version": "3",
|
||||
"env_vars_file": "examplar.variables"
|
||||
}
|
||||
|
||||
5
test/plans/atomic.plan
Normal file
5
test/plans/atomic.plan
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"plan": [
|
||||
{ "name": "independent test 1", "dependencies": [ null ] }
|
||||
]
|
||||
}
|
||||
@@ -2,35 +2,23 @@
|
||||
"units": [
|
||||
{
|
||||
"name": "independent test 1",
|
||||
"target": "/usr/bin/true",
|
||||
"rectifier": "/usr/bin/true",
|
||||
"target": "components/independent_test_1.bash",
|
||||
"rectifier": "",
|
||||
"active": true,
|
||||
"required": true,
|
||||
"rectify": true
|
||||
},
|
||||
{
|
||||
"name": "independent test 2",
|
||||
"target": "/usr/bin/true",
|
||||
"rectifier": "/usr/bin/true",
|
||||
"active": true,
|
||||
"required": false,
|
||||
"user": "root",
|
||||
"group": "root",
|
||||
"rectify": false
|
||||
},
|
||||
{
|
||||
"name": "A DEFINITION THAT IS NOT USED",
|
||||
"target": "/usr/bin/dialog --yesno test 50 50",
|
||||
"rectifier": "/usr/bin/false",
|
||||
"active": false,
|
||||
"required": false,
|
||||
"rectify": true
|
||||
},
|
||||
{
|
||||
"name": "dependent test",
|
||||
"target": "/usr/bin/false",
|
||||
"rectifier": "/usr/bin/true",
|
||||
"name": "independent test 2",
|
||||
"target": "components/independent_test_2.bash",
|
||||
"rectifier": "",
|
||||
"active": true,
|
||||
"required": true,
|
||||
"rectify": true
|
||||
"required": false,
|
||||
"user": "bagira",
|
||||
"group": "bagira",
|
||||
"rectify": false
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -4,17 +4,19 @@
|
||||
"name": "A DEFINITION THAT IS NOT USED",
|
||||
"target": "/usr/bin/dialog --yesno test 50 50",
|
||||
"rectifier": "/usr/bin/false",
|
||||
"active": true,
|
||||
"active": false,
|
||||
"required": true,
|
||||
"rectify": true
|
||||
"rectify": true,
|
||||
"user": "root"
|
||||
},
|
||||
{
|
||||
"name": "dependent test",
|
||||
"target": "/usr/bin/false",
|
||||
"rectifier": "/usr/bin/true",
|
||||
"active": true,
|
||||
"active": false,
|
||||
"required": true,
|
||||
"rectify": true
|
||||
"rectify": true,
|
||||
"user": "root"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user