mkarchiso: add version information
To date the iso version was used for iso volume information and iso file name. In my custom builds I do use it a lot more:
-
Inside the root fs: The system knows about its own version. I use this to: -> report the version to a server (poor man's inventory) -> let the system update itself
-
On the iso fs: The files are served via rsync, running systems transfer version file first to check for available update.
-
A grub environment file on the iso fs: Booting the iso from grub allows to create cow directory per version:
loopback loop archlinux.iso load_env -f (loop)/arch/grubenv linux (loop)/arch/boot/x86_64/vmlinuz-linux ...
cow_directory=archlinux/${VERSION} ...
So let's just create these files. The grub environment file is optional and
depends on whether or not grub-editenv
is available.