summaryrefslogtreecommitdiff
path: root/hooks/build-os/50-network
blob: c2cb6ee95fb40ed7c7694b80a8bfac0dab2014b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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