Looking for any possibility of reading the contents of a file (or even just the file name) into a variable in a GRUB config file? I've read that command substitution is not supported and no plans to add it, but is there any other way?
I've tried a couple other methods without success (in the grub.cfg file):
while read ver_str;
done < /version_file
cat /version_file | while read ver_string;
The goal is to read a "version string" from a file at boot with GRUB to display different menu entries for different versions, but I'd even take just getting the string from the file name
point. Any ideas? My last resort is to just use sed to modify grub.cfg when a new version of the OS is installed (for a new GRUB menu entry), but I'd prefer not to do that unless I have to.
Or what about including another grub.cfg file and then in the included GRUB config file just have the line "set ver_str=0.1.1" -- I was thinking using the 'configfile' command would do this, but doesn't seem to work as I expected.
Any help or ideas would be greatly appreciated.