From 5e5b0d039c7052b563a498608cd90e6184603504 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domen=20Ko=C5=BEar?= Date: Thu, 1 Sep 2016 10:13:47 +0200 Subject: [PATCH] install-grub.pl: add comments --- nixos/modules/system/boot/loader/grub/install-grub.pl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nixos/modules/system/boot/loader/grub/install-grub.pl b/nixos/modules/system/boot/loader/grub/install-grub.pl index 4fa157641a4..4110335a9eb 100644 --- a/nixos/modules/system/boot/loader/grub/install-grub.pl +++ b/nixos/modules/system/boot/loader/grub/install-grub.pl @@ -12,8 +12,10 @@ require List::Compare; use POSIX; use Cwd; +# system.build.toplevel path my $defaultConfig = $ARGV[1] or die; +# Grub config XML generated by grubConfig function in grub.nix my $dom = XML::LibXML->load_xml(location => $ARGV[0]); sub get { my ($name) = @_; return $dom->findvalue("/expr/attrs/attr[\@name = '$name']/*/\@value"); } @@ -97,6 +99,8 @@ sub PathInMount { } return 1; } + +# Figure out what filesystem is used for the directory with init/initrd/kernel files sub GetFs { my ($dir) = @_; my $bestFs = Fs->new(device => "", type => "", mount => "");