-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add parameter IGNORE_RELOAD to /etc/sysconfig/sapconf to prevent sapc…
…onf from changing any system tunables during package update (bsc#1209408) fix a race condition which leads to a missing start/restart of sapconf, which ends up with restored kernel parameters to defaults (bsc#1207899)
- Loading branch information
1 parent
3d31cc1
commit b5f75f5
Showing
7 changed files
with
118 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/usr/bin/env bash | ||
|
||
# sc_hooks.sh is called by post script of sapconf package installation | ||
# to handle some special cases | ||
# e.g. handle special workaround for bsc#1209408 | ||
|
||
if [ "$1" == "" ]; then | ||
echo "ERROR: missing argument" | ||
exit 1 | ||
else | ||
hook_opt="$1" | ||
fi | ||
SN=/etc/sysconfig/sapconf | ||
|
||
add_ignore() { | ||
sed -i 's/^IGNORE_RELOAD=.*/IGNORE_RELOAD=yes/' $SN | ||
} | ||
|
||
del_ignore() { | ||
ignore="nothing" | ||
entry=$(grep '^IGNORE_RELOAD="*yes"*' $SN) | ||
no_entry=$(grep '^# bsc#1209408' $SN) | ||
if [ -n "$entry" ] && [ -z "$no_entry" ]; then | ||
ignore="add" | ||
sed -i 's/^IGNORE_RELOAD=.*//' $SN | ||
fi | ||
echo $ignore | ||
} | ||
|
||
lc_add() { | ||
sed -i 's%^# /etc/security/limits.conf%# /etc/security/limits.d/sapconf-nofile.conf%' "$SN" | ||
sed -i 's/^# SAP Note 1771258$/# SAP Note 1771258 (rev. 6 from 05.11.2021)/' "$SN" | ||
sed -i 's/^# Set to 65536/# Set to 1048576 (as recommended by revision 6 of the SAP Note)/' "$SN" | ||
} | ||
|
||
case "$hook_opt" in | ||
add) | ||
add_ignore | ||
lc_add | ||
;; | ||
del) | ||
del_ignore | ||
;; | ||
nothing) | ||
lc_add | ||
;; | ||
esac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters