unix/fiss-linux

etc/start.d/05-misc.sh in master
Repositories | Summary | Log | Files | LICENSE

05-misc.sh (642B) download


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