#!/bin/sh

# Copyright (C) 2014  Sangoma Technologies Corp.
# All Rights Reserved.
#
# Author(s):
# Leonardo Lang <lang@sangoma.com>
#
# This code is Sangoma Technologies Confidential Property.
# Use of and access to this code is covered by a previously executed
# non-disclosure agreement between Sangoma Technologies and the Recipient.
# This code is being supplied for evaluation purposes only and is not to be
# used for any other purpose.

if [ -f /boot/grub/grub.conf ]; then
    # if the kernel panics, make the system reboot (issue #10352)
    /bin/sed -i -e 's#ro root=#ro panic=15 root=#g' /boot/grub/grub.conf
    # reserve space for running kdump as the crashkernel (issue 10363)
    /bin/sed -i -e 's#ro panic=#ro crashkernel=128M@64M panic=#g' /boot/grub/grub.conf
fi

exit 0
