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.
28 lines
628 B
28 lines
628 B
1 year ago
|
#!/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
|
||
|
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
|