summaryrefslogtreecommitdiff
path: root/setup-hostname
blob: b1c237917aee4255d6ffa6b9d4f63eada73f9946 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh

PROGRAM=setup-hostname
PREFIX=

. $PREFIX/lib/libalpine.sh

HOST=`hostname`
echon "Enter system hostname (short form, e.g. 'foo') [$HOST]: "
default_read HOST `hostname`

mkdir -p "$ROOT/etc"
echo "$HOST" > "$ROOT/etc/hostname"