diff options
-rw-r--r-- | Makefile | 9 | ||||
-rw-r--r-- | hook/uname | 4 | ||||
-rw-r--r-- | install/uname | 10 | ||||
-rw-r--r-- | systemd/uname | 2 |
4 files changed, 16 insertions, 9 deletions
@@ -1,16 +1,19 @@ # Makefile for mkinitcpio-uname -VERSION=0.2.0 +VERSION=0.2.2 all: @echo "Just run make install..." .PHONY: install install: + # install script and unit file + install -D -m0755 systemd/uname $(DESTDIR)/usr/lib/systemd/scripts/uname + install -D -m0644 systemd/uname.service $(DESTDIR)/usr/lib/systemd/system/uname.service + + # install install-script and hook for plain old script based initramfs install -D -m0644 install/uname $(DESTDIR)/usr/lib/initcpio/install/uname install -D -m0755 hook/uname $(DESTDIR)/usr/lib/initcpio/hooks/uname - install -D -m0644 systemd/uname.service $(DESTDIR)/usr/lib/systemd/system/uname.service - install -D -m0755 systemd/uname $(DESTDIR)/usr/lib/systemd/scripts/uname release: git archive --format=tar.xz --prefix=mkinitcpio-uname-$(VERSION)/ $(VERSION) > mkinitcpio-uname-$(VERSION).tar.xz @@ -2,9 +2,9 @@ run_latehook() { if [ -s /new_root/version ]; then - echo " Booting $(cat /new_root/version) with $(uname -srm)." + echo " Booting [1;37m$(cat /new_root/version)[0m with [1;37m$(uname -srm)[0m." else - echo " Booting $(uname -srm)." + echo " Booting [1;37m$(uname -srm)[0m." fi echo } diff --git a/install/uname b/install/uname index 153a646..f1eb5b3 100644 --- a/install/uname +++ b/install/uname @@ -1,10 +1,14 @@ #!/bin/sh build() { - if add_systemd_unit uname.service 2>/dev/null; then + if command -v add_systemd_unit >/dev/null; then + add_systemd_unit "uname.service" + # busybox provides uname, but the base hook is not prerequisite - # for a systemd-enable initramfs - so add uname - add_binary uname + # for a systemd-enable initramfs - so add uname if required + if [ ! -e "${BUILDROOT}/usr/bin/uname" ]; then + add_binary uname + fi add_symlink "/usr/lib/systemd/system/sysinit.target.wants/uname.service" "../uname.service" else diff --git a/systemd/uname b/systemd/uname index 7143927..293bdfb 100644 --- a/systemd/uname +++ b/systemd/uname @@ -1,4 +1,4 @@ #!/bin/sh -echo " Booting $(uname -srm)." +echo " Booting [1;37m$(uname -srm)[0m." echo |