• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
10mount -t proc none /proc
11mount -t sysfs none /sys
12mount -t debugfs none /sys/kernel/debug
13mount -t devtmpfs none /dev || echo possibly already mounted
14mkdir -p /dev/pts
15mount -t devpts devpts /dev/pts
16mount -t tmpfs tmpfs /tmp
17
18echo "nameserver 8.8.8.8" > /etc/resolv.conf
19[ -z "$NFS_SERVER_IP" ] || echo "$NFS_SERVER_IP caching-proxy" >> /etc/hosts
20
21# Set the time so we can validate certificates before we fetch anything;
22# however as not all DUTs have network, make this non-fatal.
23for i in 1 2 3; do sntp -sS pool.ntp.org && break || sleep 2; done || true
24