From 7f0fb7150b26fa27512dc24da5db06349c19df0d Mon Sep 17 00:00:00 2001 From: simono41 Date: Sun, 8 Apr 2018 20:07:02 +0200 Subject: [PATCH] hostname --- arch-graphical-install-auto | 3 ++- make_mksquashfs-auto.sh | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/arch-graphical-install-auto b/arch-graphical-install-auto index cf0bd83..e305b60 100755 --- a/arch-graphical-install-auto +++ b/arch-graphical-install-auto @@ -23,7 +23,8 @@ username="$2" userpass="$3" archchroot="$4" -[[ -z "${version}" ]] && version="voll" +hostname="$(cat /etc/hostname)" +version="${hostname#*-}" [[ -z "${username}" ]] && username="user1" [[ -z "${userpass}" ]] && userpass="user1" diff --git a/make_mksquashfs-auto.sh b/make_mksquashfs-auto.sh index 0c2af5b..ce7a1ae 100755 --- a/make_mksquashfs-auto.sh +++ b/make_mksquashfs-auto.sh @@ -24,6 +24,7 @@ parameter6="$7" arch=$(uname -m) [[ -z "${version}" ]] && version="voll" +hostname="SpectreOS-${version}" work_dir="${version}" if [ "${version}" == "libre" ]; then @@ -408,6 +409,7 @@ if [ "${parameter2}" != "skip" ]; then echo "Bitte führen sie arch-graphical-install-auto und die Version aus." echo "Benutze Poweroff um das System wieder herunterzufahren und das Komprimieren zu beginnen :)" cp arch-graphical-install-auto ${work_dir}/${arch}/airootfs/usr/bin/arch-graphical-install-auto + echo "${hostname}" > ${work_dir}/${arch}/airootfs/etc/hostname if [ "${parameter6}" != "archchroot" ]; then systemd-nspawn -b -D ${work_dir}/${arch}/airootfs else