From 7c7ebc28c16aff10ffb7b4fe6a7beba50c9be2ce Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Wed, 26 Jun 2013 14:00:07 +0300 Subject: setup-gummiboot-conf: improve commentaries Signed-off-by: Artem Bityutskiy --- setup-gummiboot-conf | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/setup-gummiboot-conf b/setup-gummiboot-conf index 1fa88fd..93b3443 100755 --- a/setup-gummiboot-conf +++ b/setup-gummiboot-conf @@ -4,19 +4,20 @@ # Author: Artem Bityutskiy # License: GPLv2 -# This script assumes there is a working gummiboot configuration exists. This -# scripts then scanse the boot partition, finds out which kernels are -# available, and updates the gummiboot kernel entries: adds missing kernel -# entries and delets non-existing kernel entries. The default entry is always -# set to the latest kernel. +# This scripts then scans ESP, finds out which kernels are available, and +# updates the gummiboot kernel entries: adds missing kernel entries and delets +# non-existing kernel entries. The default entry is always set to the newest +# kernel version. # -# We make several assumptions in this script. -# 1. The kernel binary names are 'vmlinuz-' -# 2. Kernel entry file names are 'vmlinuz-.conf' -# 3. There is always the "default" keyword in loader.conf, and we use the -# corresponding kernel entry for adding new kernels. -# 4. The 'default' entry in loader.conf does not does not use the wildcard ("*") -# 5. Kernels binaries are placed in the ESP root +# This scripts makes several assumptions. +# 1. There is already a valid gummiboot configuration in ESP +# 2. The kernel binary names are 'vmlinuz-', and the gummiboot kernel +# entry file names are 'vmlinuz-.conf' +# 3. There is always the "default" keyword in loader.conf. +# 4. The default entry (in 'loader.conf) can safely be used as a pattern for +# adding new entries (e.g., the kernel arguments are taken from there) +# 4. The 'default' entry name does not have wildcards ("*") +# 5. Kernels binaries are placed in the root of ESP # # May be there are few more implicit assumption. This all can be improved and # made to be more flexible if needed. @@ -72,7 +73,6 @@ pattern="$(printf "%s" "$pattern" | sed -e '/[ \t]*version[ \t]\+/d')" # Create a gummiboot entry for every new kernel printf "%s\n" "$kernels" | while IFS= read -r kernel; do - if [ -f "$entries_dir/$kernel.conf" ]; then continue fi -- cgit v1.2.3