]> piware.de Git - bin.git/commitdiff
build-*-toolbox: Set host name to distro-version
authorMartin Pitt <martin@piware.de>
Fri, 13 Mar 2020 07:18:00 +0000 (08:18 +0100)
committerMartin Pitt <martin@piware.de>
Fri, 13 Mar 2020 07:18:40 +0000 (08:18 +0100)
So that the hostname shell prompt shows which toolbox I'm in.

build-debian-toolbox
build-devtoolbox

index 95584390a5975d01593dba10ed0c1858cb741507..855f4c3bba5f19b8272a9f24133f72661aad6737 100755 (executable)
@@ -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
index 004c5373e1d3e3da40c5f273fc694eafdc74bacd..de82ed0a68884c60a056d1816695a7ba9e3a0d32 100755 (executable)
@@ -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/*"