You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

34 lines
822 B

#!/bin/sh
#
# This script performs default actions. It is invoked with CONFIG set
# for the subhost.
OVERLAYDIR="$(dirname $(realpath $0))"
. $OVERLAYDIR/functions
subhost_name "$CONFIG"
subhost_config
# Print the default init script
cat <<EOF
set -x
mount -t proc proc /proc
mount -t devpts devpts /dev/pts
mount -t sysfs sysfs /sys
if [ "$RAM_SIZE" != "none" ] && ! grep -q '/run tmpfs' /proc/mounts ; then
mount -t tmpfs -osize=$RAM_SIZE,mode=755 tmpfs /run
fi
for srv in $START ; do service \$srv start ; done
dummy_service() {
[ \$# -gt 3 ] && return 0
echo "Starting dummy service" >&2
set +x
[ -p /run/dummy_service ] || mkfifo /run/dummy_service
( printf dummy_service > /proc/self/comm ; read X < /run/dummy_service ) &
set -x
}
dummy_service /proc/*/comm
exec /.reaper $NAME
EOF