Add bind-mount for /etc/adjtime to make subhost use host clock without ado
[rrq/overlay-boot.git] / overlay-init
1 #!/bin/sh
2 #
3 # This script performs default actions. It is invoked with CONFIG set
4 # for the subhost.
5
6 OVERLAYDIR="$(dirname $(realpath $0))"
7 . $OVERLAYDIR/functions
8
9 subhost_name "$CONFIG"
10 subhost_config
11
12 # Print the default init script
13 cat <<EOF
14 set -x
15 mount -t proc proc /proc
16 for srv in $START ; do service \$srv start ; done
17 dummy_service() {
18     [ \$# -gt 3 ] && return 0
19     echo "Starting dummy service" >&2
20     set +x
21     [ -p /run/dummy_service ] || mkfifo /run/dummy_service
22     ( printf dummy_service > /proc/self/comm ; read X < /run/dummy_service ) &
23     set -x
24 }
25 dummy_service /proc/*/comm
26 exec /.reaper $NAME
27 EOF