xcat-core/xCAT/postscripts/enablesysreq
immarvin b8aed9fca1 add return value
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14406 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-23 02:31:37 +00:00

20 lines
430 B
Bash
Executable File

#!/bin/ksh
# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html
#(C)IBM Corp
case "$OSVER" in
sles*|suse*|ul*)
perl -pi -e 's/^ENABLE_SYSRQ.*/ENABLE_SYSRQ="yes"/' /etc/sysconfig/sysctl
;;
rh*)
if egrep "^kernel\.sysrq" /etc/sysctl.conf >/dev/null 2>&1
then
perl -pi -e 's/^kernel\.sysrq.*/kernel.sysrq = 1/' /etc/sysctl.conf
else
echo "kernel.sysrq = 1" >>/etc/sysctl.conf
fi
;;
esac
exit 0