diff options
-rw-r--r-- | Makefile | 6 | ||||
-rw-r--r-- | hook/hostname | 3 | ||||
-rw-r--r-- | install/hostname | 1 |
3 files changed, 4 insertions, 6 deletions
@@ -1,6 +1,6 @@ # Makefile for mkinitcpio-hostname -VERSION=0.2.0 +VERSION=0.2.2 all: @echo "Just run make install..." @@ -12,5 +12,5 @@ install: release: git archive --format=tar.xz --prefix=mkinitcpio-hostname-$(VERSION)/ $(VERSION) > mkinitcpio-hostname-$(VERSION).tar.xz - gpg -ab mkinitcpio-hostname-$(VERSION).tar.xz - git notes --ref=refs/notes/signatures/tar add -C $$(git archive --format=tar --prefix=mkinitcpio-hostname-$(VERSION)/ $(VERSION) | gpg --armor --detach-sign | git hash-object -w --stdin) $(VERSION) + gpg --armor --detach-sign --comment mkinitcpio-hostname-$(VERSION).tar.xz mkinitcpio-hostname-$(VERSION).tar.xz + git notes --ref=refs/notes/signatures/tar add -C $$(git archive --format=tar --prefix=mkinitcpio-hostname-$(VERSION)/ $(VERSION) | gpg --armor --detach-sign --comment mkinitcpio-hostname-$(VERSION).tar | git hash-object -w --stdin) $(VERSION) diff --git a/hook/hostname b/hook/hostname index 0ef6f6f..585229a 100644 --- a/hook/hostname +++ b/hook/hostname @@ -3,14 +3,13 @@ run_latehook() { local newroot="/new_root/" - /usr/bin/systemd-machine-id-setup --root="${newroot}" - if [[ ! -s "${newroot}/etc/hostprefix" ]]; then cp "${newroot}/etc/hostname" "${newroot}/etc/hostprefix" fi hostprefix="$(cat "${newroot}/etc/hostprefix")" if [[ -n "${hostname}" ]]; then + hostname="${hostname%%.*}" msg ":: Setting hostname for main system to '${hostprefix}-${hostname}'..." elif [[ -e /sys/class/dmi/id/product_uuid ]]; then msg ":: Setting hostname from product uuid..." diff --git a/install/hostname b/install/hostname index 58ad350..7f41a4d 100644 --- a/install/hostname +++ b/install/hostname @@ -2,7 +2,6 @@ build() { add_runscript - add_binary /usr/bin/systemd-machine-id-setup } help() { |