ktune: do not revert sysctl settings on ktune stop
Now the sysctl settings are not reverted on ktune stop. This is to avoid cases where the time window when the sysctl settings are reverted can cause unwanted behaviour. E.g. it can temporary reset system limits on disk addition (because ktune service is restarted by udev) which may cause some commands to fail. It is still possible to switch to the old behaviour (reverting sysctl) by exporting KTUNE_REVERT_SYSCTL and setting it to 1. This can be also set per profile in the /etc/tune-profiles/PROFILE_NAME/ktune.sysconfig by adding the following: KTUNE_REVERT_SYSCTL=1 Resolves: rhbz#1111416 Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
This commit is contained in:
parent
3f489dfaa6
commit
abb08bb75d
1 changed files with 4 additions and 2 deletions
|
|
@ -176,8 +176,10 @@ load_sysctl() {
|
|||
|
||||
revert_sysctl() {
|
||||
if [ -r "$SAVE_FILE" ]; then
|
||||
echo -n $"Reverting to saved sysctl settings: "
|
||||
load_file "$SAVE_FILE" 0
|
||||
if [ "$KTUNE_REVERT_SYSCTL" = 1 ]; then
|
||||
echo -n $"Reverting to saved sysctl settings: "
|
||||
load_file "$SAVE_FILE" 0
|
||||
fi
|
||||
/bin/rm -f "$SAVE_FILE"
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue