<commit_before>#!/bin/sh
# check/create bridged interface for use with openvswitch if it doesn't exist
# assumes your primary interface is called "bond0"
# assumes you're running a Red Hat based distribution

check_os_version()
{  # check /etc/redhat-release
   cat /etc/redhat-release | awk '{print $1}'
}

os_version=$(check_os_version)

start_ovs()
{
case $os_version in
'Fedora')
	systemctl enable openvswitch.service
	systemctl start openvswitch.service
;;
'Red')
	chkconfig --add openvswitch
        service openvswitch start
;;
esac<commit_msg>detect OS version by kernel not release<commit_after>#!/bin/sh
# check/create bridged interface for use with openvswitch if it doesn't exist
# assumes your primary interface is called "bond0"
# assumes you're running a Red Hat based distribution

detect_os()
{  # EL6 kernel will be 2.6.x kernel, EL7+ or Fedora will be 3.x
   kernelver=`uname -a | awk '{print $3}' | awk -F "." '{print $1}'`
}

os_version=$(detect_os)

start_ovs()
{
case $os_version in
'3')
	systemctl enable openvswitch.service
	systemctl start openvswitch.service
;;
'2')
	chkconfig --add openvswitch
        service openvswitch start
;;
esac
{'fraction_non_alphanumeric': 0.10395189003436427, 'fraction_numerical': 0.010309278350515464, 'mean_word_length': 4.469483568075117, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3605288', 'n_tokens_mistral': 390, 'n_tokens_neox': 376, 'n_words': 129}