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
Rafael Monnerat
slapos.package
Commits
6fae4abe
Commit
6fae4abe
authored
Aug 02, 2022
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playbook/ors-upgrade: adapt to new ors-amarisoft SR
parent
e6bbdfbb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
39 deletions
+0
-39
playbook/roles/ors-upgrade/files/give-cap-sys-nice-lteenb
playbook/roles/ors-upgrade/files/give-cap-sys-nice-lteenb
+0
-23
playbook/roles/ors-upgrade/files/slapsoft-give-cap-sys-nice-lteenb
...roles/ors-upgrade/files/slapsoft-give-cap-sys-nice-lteenb
+0
-1
playbook/roles/ors-upgrade/tasks/main.yml
playbook/roles/ors-upgrade/tasks/main.yml
+0
-14
playbook/settings/ors-upgrade.yml
playbook/settings/ors-upgrade.yml
+0
-1
No files found.
playbook/roles/ors-upgrade/files/give-cap-sys-nice-lteenb
deleted
100755 → 0
View file @
e6bbdfbb
#!/bin/bash
if
[
$#
-eq
0
]
;
then
echo
"Missing argument"
;
exit
1
;
fi
element-in
()
{
local
e
match
=
"
$1
"
;
shift
for
e
in
"
$@
"
;
do
[[
"
$e
"
==
"
$match
"
]]
&&
return
0
;
done
return
1
}
BINARY
=
$1
# List of hash for all supported lteenb / lteenb-avx2 binaries
SHA256_LIST
=(
\
"03e8641094b1909562dbf25678354ea09edb8109743cc3cdda43c4b423a36c07"
\
"09e5ff98bb6839e72d14728e9839fcbfb5873f786281b658a6c0d790ac1ff227"
\
)
element-in
$(
sha256sum
$BINARY
)
"
${
SHA256_LIST
[@]
}
"
||
{
echo
"
$1
sha256sum mismatch"
>
&2
;
exit
1
;
}
# relative RPATH gets ignored after capability has been set on binary
patchelf
--set-rpath
$(
dirname
$BINARY
)
$BINARY
;
setcap
cap_sys_nice
=
+pe
$BINARY
;
playbook/roles/ors-upgrade/files/slapsoft-give-cap-sys-nice-lteenb
deleted
100644 → 0
View file @
e6bbdfbb
slapsoft ALL=NOPASSWD:/opt/amarisoft/give-cap-sys-nice-lteenb
playbook/roles/ors-upgrade/tasks/main.yml
View file @
6fae4abe
---
-
name
:
Get current LTE version
stat
:
path=/opt/amarisoft/lte
register
:
lte_version
-
name
:
Get hostname
shell
:
hostname
register
:
hostname
-
name
:
Check new LTE
debug
:
msg="New amarisoft LTE available"
when
:
lte_version.stat.lnk_target is not search(current_lte_version)
-
name
:
Check hostname
debug
:
var=hostname
-
name
:
Install give-cap-sys-nice-lteenb script
copy
:
src=give-cap-sys-nice-lteenb dest={{ install_folder }} owner=root mode=770
-
name
:
Install rm-tmp-lte script
copy
:
src=rm-tmp-lte dest={{ install_folder }} owner=root mode=770
-
name
:
Give permission to slapsoft to execute give-cap-sys-nice-lteenb script
copy
:
src=slapsoft-give-cap-sys-nice-lteenb dest=/etc/sudoers.d owner=root mode=440
-
name
:
Give permission to slapuser to remove tmp files owned by other slapuser
copy
:
src=slapuser-rm-tmp dest=/etc/sudoers.d owner=root mode=440
...
...
playbook/settings/ors-upgrade.yml
View file @
6fae4abe
---
current_lte_version
:
"
2021-09-18"
install_folder
:
"
/opt/amarisoft"
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