Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.package
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Arnaud Véron
slapos.package
Commits
56681f74
Commit
56681f74
authored
Mar 31, 2023
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playbook/ors: give permission to slapuser to launch sdr-util
Patch for callboxes and simboxes
parent
bc9278a4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
playbook/roles/ors/files/configure-sudoers
playbook/roles/ors/files/configure-sudoers
+11
-1
playbook/sha256sum
playbook/sha256sum
+1
-1
No files found.
playbook/roles/ors/files/configure-sudoers
View file @
56681f74
...
...
@@ -12,4 +12,14 @@ for c in "${COMMAND_LIST[@]}"; do
chmod
440 /etc/sudoers.d/slapuser-
$c
fi
done
exit
c
=
"sdr-util"
SLAPUSER_LINES
=
"
$(
cat
/etc/sudoers.d/slapuser-
$c
2> /dev/null |
wc
-l
)
"
AMARISOFT_PATH
=
"/opt/amarisoft/
$(
ls
-1
/opt/amarisoft |
grep
"^v[0-9]
\{
4
\}
-[0-9]
\{
2
\}
-[0-9]
\{
2
\}
$"
|
sort
|
tail
-n1
)
"
if
[
"
$SLAPUSER_LINES
"
!=
"
$PARTITION_AMOUNT
"
]
;
then
echo
"Configuring /etc/sudoers.d/slapuser-
$c
..."
for
i
in
$(
seq
0
$((
$PARTITION_AMOUNT
-
1
))
)
;
do
echo
"slapuser
$i
ALL=NOPASSWD:
$AMARISOFT_PATH
/trx_sdr/sdr_util -c 0 version"
>>
slapuser-
$c
done
mv
slapuser-
$c
/etc/sudoers.d/
chmod
440 /etc/sudoers.d/slapuser-
$c
fi
playbook/sha256sum
View file @
56681f74
aa42c27685d0638e782967060d77a07044c179046043128fc712d5880dda1383
-
8df60f2f0c5c3c5eec736dc6274af83bd056222895d4381abc9a8f3c6a63e367
-
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment