<commit_before>os_install(){

	# Update the system and use pacman to install all the packages
	# The two commands may be combined, but I leave it as is for now.
	os_upgrade
	
	# Since docker and git is installed by default, we have nothing more to do here

	# TODO: Check if HypriotOS has brctl by default
}


os_upgrade(){
	echo "Upgrading packages..."
	apt-get update -y && apt-get upgrade -y
}

os_post_install(){
	# Reflect the new hostname in /boot/occidentalis
	newhostname=$(hostnamectl | grep hostname | awk '{print $3}')
	sed -i "/hostname=/c\hostname=$newhostname" /boot/occidentalis.txt

	# Write the DNS options to the file
	cat >> /etc/dhcp/dhclient.conf <<EOF 
prepend domain-search "default.svc.cluster.local","svc.cluster.local","cluster.local";
prepend domain-name-servers 10.0.0.10;
EOF

}<commit_msg>Install bridge-utils on hypriotos when running kube-config install<commit_after>os_install(){

	# Update the system and use pacman to install all the packages
	# The two commands may be combined, but I leave it as is for now.
	os_upgrade
	
	# Since docker and git is installed by default, we have nothing more to do here

	# If brctl isn't installed, install it
	if [[ ! -f $(which brctl 2>&1) ]]; then
		apt-get install bridge-utils -y
	fi
}


os_upgrade(){
	echo "Upgrading packages..."
	apt-get update -y && apt-get upgrade -y
}

os_post_install(){
	# Reflect the new hostname in /boot/occidentalis
	newhostname=$(hostnamectl | grep hostname | awk '{print $3}')
	sed -i "/hostname=/c\hostname=$newhostname" /boot/occidentalis.txt

	# Write the DNS options to the file
	cat >> /etc/dhcp/dhclient.conf <<EOF 
prepend domain-search "default.svc.cluster.local","svc.cluster.local","cluster.local";
prepend domain-name-servers 10.0.0.10;
EOF

}
{'fraction_non_alphanumeric': 0.1135718341851221, 'fraction_numerical': 0.009085746734809767, 'mean_word_length': 4.005681818181818, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '3836100', 'n_tokens_mistral': 599, 'n_tokens_neox': 575, 'n_words': 204}