aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2016-01-18 14:26:42 +0100
committerGravatar Christian Hesse <mail@eworm.de>2016-01-18 14:26:42 +0100
commit4045941249c126915b1ac4e26c344195c673c22f (patch)
treecc9ac1699f27b46440b0b95fa69fdd8d8e361285
parent334d3d667c5fd51a7ba08cf2a2e174cc6b99226c (diff)
downloadmkinitcpio-ykfde-4045941249c126915b1ac4e26c344195c673c22f.tar.gz
mkinitcpio-ykfde-4045941249c126915b1ac4e26c344195c673c22f.tar.zst
add and install grub configuration
-rw-r--r--Makefile1
-rwxr-xr-xgrub/09_linux16
2 files changed, 17 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index a7b2c46..8f8e006 100644
--- a/Makefile
+++ b/Makefile
@@ -39,6 +39,7 @@ install-bin: bin/ykfde udev/ykfde
$(MAKE) -C bin install
$(MAKE) -C udev install
$(INSTALL) -D -m0644 conf/ykfde.conf $(DESTDIR)/etc/ykfde.conf
+ $(INSTALL) -D -m0755 grub/09_linux $(DESTDIR)/etc/grub.d/09_linux
$(INSTALL) -D -m0644 systemd/ykfde-cpio.service $(DESTDIR)/usr/lib/systemd/system/ykfde-cpio.service
$(INSTALL) -D -m0644 systemd/ykfde-2f.service $(DESTDIR)/usr/lib/systemd/system/ykfde-2f.service
$(INSTALL) -D -m0755 systemd/ykfde-2f $(DESTDIR)/usr/lib/systemd/scripts/ykfde-2f
diff --git a/grub/09_linux b/grub/09_linux
new file mode 100755
index 0000000..5fbef4c
--- /dev/null
+++ b/grub/09_linux
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+prefix="/usr"
+datarootdir="${prefix}/share"
+sysconfdir="/etc"
+grub_mkconfig_dir="${sysconfdir}/grub.d"
+
+source "${datarootdir}/grub/grub-mkconfig_lib"
+
+ykfde-cpio
+YKFDE_CHALLENGES="$(make_system_path_relative_to_its_root /boot/ykfde-challenges.img)"
+
+source "${grub_mkconfig_dir}/10_linux" | sed \
+ -e "/\\s*initrd/s|$| ${YKFDE_CHALLENGES}|" \
+ -e "/\\s*menuentry/s|menuentry '\\(.*\\)' --|menuentry '\\1 for YKFDE' --|"
+