Disable reboot on control-alt-delete for RedHat/CentOS 5/6/7
That's a four calls to cat /etc/redhat-release.  A case statement could help reduce the clutter:

case "`cat /etc/redhat-release`" in
  *"release 5."*)
    cp /etc/inittab /etc/inittab.install
    sed -i 's/ca::ctrlaltdel/#ca::ctrlaltdel/' /etc/inittab
    init q
    ;;
  *"release 6."*)
    echo 'exec false' &gt; /etc/init/control-alt-delete.conf
    ;;
  *"release 7."*)
    systemctl mask ctrl-alt-del.target
    systemctl daemon-release
    ;;
  *)
    cat /etc/redhat-release 2&gt;&amp;1 | mailx -s "ctrl-alt-delete disable failure" some.user@example.com
    ;;
esac