05-misc.sh (642B)
1 # vim: set ts=4 sw=4 et: 2 3 install -m0664 -o root -g utmp /dev/null /run/utmp 4 halt -B # for wtmp 5 6 if [ -z "$VIRTUALIZATION" ]; then 7 msg "Seeding random number generator..." 8 seedrng || true 9 fi 10 11 msg "Setting up loopback interface..." 12 ip link set up dev lo 13 14 [ -r /etc/hostname ] && read -r HOSTNAME < /etc/hostname 15 if [ -n "$HOSTNAME" ]; then 16 msg "Setting up hostname to '${HOSTNAME}'..." 17 printf "%s" "$HOSTNAME" > /proc/sys/kernel/hostname 18 else 19 msg_warn "Didn't setup a hostname!" 20 fi 21 22 if [ -n "$TIMEZONE" ]; then 23 msg "Setting up timezone to '${TIMEZONE}'..." 24 ln -sf "/usr/share/zoneinfo/$TIMEZONE" /etc/localtime 25 fi