From daff02a49e7b1c099d9f105f4f30a68195cfffa2 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 13 Mar 2020 08:18:00 +0100 Subject: [PATCH] build-*-toolbox: Set host name to distro-version So that the hostname shell prompt shows which toolbox I'm in. --- build-debian-toolbox | 5 +++++ build-devtoolbox | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/build-debian-toolbox b/build-debian-toolbox index 9558439..855f4c3 100755 --- a/build-debian-toolbox +++ b/build-debian-toolbox @@ -29,6 +29,11 @@ toolbox run --container $RELEASE sh -exc ' # otherwise installing systemd fails sudo umount /var/log/journal +# useful hostname +. /etc/os-release +echo "${ID}-${VERSION_ID}" | sudo tee /etc/hostname +sudo hostname -F /etc/hostname + sudo eatmydata apt-get -y dist-upgrade # development tools diff --git a/build-devtoolbox b/build-devtoolbox index 004c537..de82ed0 100755 --- a/build-devtoolbox +++ b/build-devtoolbox @@ -19,6 +19,11 @@ if [ ! -e /etc/resolv.conf ]; then sudo ln -sfn /run/host/monitor/resolv.conf /etc/resolv.conf fi +# useful hostname +. /etc/os-release +echo "${ID}-${VERSION_ID}" | sudo tee /etc/hostname +sudo hostname -F /etc/hostname + # this just refuses to rpm -i normally sudo dnf install -y cpio rpm2cpio ~martin/Dokumente/Arbeit/RedHat/redhat-internal-cert-install-0.1-7.el7.csb.noarch.rpm | sudo cpio -id --directory=/ --verbose "./etc/pki/*" -- 2.39.5