Merge pull request #556 from jmencak/ksm-return-0
Return 0 when ksm services do not exist
This commit is contained in:
commit
9a27fc6879
1 changed files with 2 additions and 2 deletions
|
|
@ -566,7 +566,7 @@ disable_ksm()
|
|||
die "failed to create $KSM_MASK_FILE"
|
||||
fi
|
||||
# Do not run any systemctl commands if $KSM_SERVICES units do not exist
|
||||
systemctl cat -- $KSM_SERVICES &> /dev/null || return
|
||||
systemctl cat -- $KSM_SERVICES &> /dev/null || return 0
|
||||
systemctl --now --quiet mask $KSM_SERVICES
|
||||
# Unmerge all shared pages
|
||||
test -f $KSM_RUN_PATH && echo 2 > $KSM_RUN_PATH
|
||||
|
|
@ -578,7 +578,7 @@ enable_ksm()
|
|||
{
|
||||
if [ -f $KSM_MASK_FILE ]; then
|
||||
# Do not run any systemctl commands if $KSM_SERVICES units do not exist
|
||||
systemctl cat -- $KSM_SERVICES &> /dev/null || return
|
||||
systemctl cat -- $KSM_SERVICES &> /dev/null || return 0
|
||||
if systemctl --quiet unmask $KSM_SERVICES; then
|
||||
rm -f $KSM_MASK_FILE
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in a new issue