summaryrefslogtreecommitdiff
path: root/hooks/build-os/50-network
diff options
context:
space:
mode:
Diffstat (limited to 'hooks/build-os/50-network')
-rwxr-xr-xhooks/build-os/50-network16
1 files changed, 16 insertions, 0 deletions
diff --git a/hooks/build-os/50-network b/hooks/build-os/50-network
new file mode 100755
index 0000000..c2cb6ee
--- /dev/null
+++ b/hooks/build-os/50-network
@@ -0,0 +1,16 @@
+#!/bin/bash -xe
+set -o pipefail
+
+# Append motd
+
+cat >> "${root:?}"/etc/motd << EOF
+
+${osname:?}/${osversion:?} (${osdesc:?}) v${version:?}
+EOF
+
+# Set hostname
+echo "${osname:?}-${osversion:?}" > "${root:?}"/etc/hostname
+echo "127.0.1.1 ${osname:?}-${osversion:?}" >> "${root:?}"/etc/hosts
+
+# Install network manager
+chroot "${root:?}" apt-get install -y network-manager