1#!/bin/sh 2 3# Very early init, used to make sure devices and network are set up and 4# reachable. 5 6set -ex 7 8cd / 9 10findmnt --mountpoint /proc || mount -t proc none /proc 11findmnt --mountpoint /sys || mount -t sysfs none /sys 12mount -t debugfs none /sys/kernel/debug 13findmnt --mountpoint /dev || mount -t devtmpfs none /dev 14mkdir -p /dev/pts 15mount -t devpts devpts /dev/pts 16mkdir /dev/shm 17mount -t tmpfs -o noexec,nodev,nosuid tmpfs /dev/shm 18mount -t tmpfs tmpfs /tmp 19 20echo "nameserver 8.8.8.8" > /etc/resolv.conf 21[ -z "$NFS_SERVER_IP" ] || echo "$NFS_SERVER_IP caching-proxy" >> /etc/hosts 22 23# Set the time so we can validate certificates before we fetch anything; 24# however as not all DUTs have network, make this non-fatal. 25for _ in 1 2 3; do sntp -sS pool.ntp.org && break || sleep 2; done || true 26