summaryrefslogtreecommitdiff
path: root/gnu/system.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-06-25 22:46:44 +0200
committerLudovic Courtès <ludo@gnu.org>2014-06-25 23:53:27 +0200
commit2d23e6f0515bc2e3a8a388cbe881ac372b162f9e (patch)
tree9f1c5feea9216954018870fde33e1a797d94c3d8 /gnu/system.scm
parent7cd157e22164cfd93968900cdd68e88963cfd4ba (diff)
downloadpatches-2d23e6f0515bc2e3a8a388cbe881ac372b162f9e.tar
patches-2d23e6f0515bc2e3a8a388cbe881ac372b162f9e.tar.gz
system: Factorize GRUB menu entry label.
* gnu/system.scm (kernel->grub-label): New procedure. (operating-system-grub.cfg): Use it.
Diffstat (limited to 'gnu/system.scm')
-rw-r--r--gnu/system.scm12
1 files changed, 8 insertions, 4 deletions
diff --git a/gnu/system.scm b/gnu/system.scm
index c2d31de15d..e1337da749 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -486,6 +486,13 @@ we're running in the final root."
((initrd ((operating-system-initrd os) boot-file-systems)))
(return #~(string-append #$initrd "/initrd"))))
+(define (kernel->grub-label kernel)
+ "Return a label for the GRUB menu entry that boots KERNEL."
+ (string-append "GNU system with "
+ (string-titlecase (package-name kernel)) " "
+ (package-version kernel)
+ " (technology preview)"))
+
(define (operating-system-grub.cfg os)
"Return the GRUB configuration file for OS."
(mlet* %store-monad
@@ -493,10 +500,7 @@ we're running in the final root."
(root-fs -> (operating-system-root-file-system os))
(kernel -> (operating-system-kernel os))
(entries -> (list (menu-entry
- (label (string-append
- "GNU system with "
- (package-full-name kernel)
- " (technology preview)"))
+ (label (kernel->grub-label kernel))
(linux kernel)
(linux-arguments
(list (string-append "--root="