aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile6
-rw-r--r--hook/hostname3
-rw-r--r--install/hostname1
3 files changed, 4 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index ef9aa53..d6ef632 100644
--- a/Makefile
+++ b/Makefile
@@ -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() {