setup-gummiboot-conf: improve commentaries
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Wed, 26 Jun 2013 11:00:07 +0000 (14:00 +0300)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Wed, 26 Jun 2013 11:00:07 +0000 (14:00 +0300)
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
setup-gummiboot-conf

index 1fa88fd..93b3443 100755 (executable)
@@ -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-<version>'
-# 2. Kernel entry file names are 'vmlinuz-<version>.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-<version>', and the gummiboot kernel
+#    entry file names are 'vmlinuz-<version>.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