#!/bin/bash
#
# chkconfig: 345 49 51
# description: Adjusts the oom_score_adj score of non-procmanager processes so that
# they cannot be killed by the kernel out of memory manager

case "$1" in
start)
    /usr/bin/EosOomAdjust
    RETVAL=$?
    [ "$RETVAL" = 0 ] && touch /var/lock/subsys/EosOomAdjust
    ;;
stop)
    /usr/bin/EosOomAdjust -k
    ;;
*)
    echo $"Usage: $0 {start|stop}"
    exit 1
esac
