#!/bin/bash
version="$1"

if [[ -e /ram_session ]]
then
	#Only generate the initrd image if one doesn't already exist
	if [[ ! -e /boot/initrd.img-$1 ]] && [[ ! -e /boot/rs_kernels/initrd.img-$1 ]]
	then
		echo "ram_session_initramfs: Generating initramfs image"
		#Generate an initramfs image
		mkinitramfs -o /boot/initrd.img-$version $version
	fi
fi
