blob: 8f5c6c5b2ffdaa4c2b9635ebc3db5c53d69db259 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# vim: set ts=4 sw=4 et:
msg "Initializing random seed..."
cp /var/lib/random-seed /dev/urandom >/dev/null 2>&1 || true
( umask 077; bytes=$(cat /proc/sys/kernel/random/poolsize) || bytes=512; dd if=/dev/urandom of=/var/lib/random-seed count=1 bs=$bytes >/dev/null 2>&1 )
msg "Setting up loopback interface..."
ip link set up dev lo
[ -r /etc/hostname ] && read -r HOSTNAME < /etc/hostname
if [ -n "$HOSTNAME" ]; then
msg "Setting up hostname to '${HOSTNAME}'..."
echo "$HOSTNAME" > /proc/sys/kernel/hostname
else
msg_warn "Didn't setup a hostname!"
fi
if [ -n "$TIMEZONE" ]; then
msg "Setting up timezone to '${TIMEZONE}'..."
ln -sf "/usr/share/zoneinfo/$TIMEZONE" /etc/localtime
fi
|