Importing into a fresh repository.
Showing
3 changed files
with
59 additions
and
0 deletions
Dockerfile
0 → 100644
docker-compose.yml
0 → 100644
overlay/usr/local/sbin/docker-init
0 → 100755
1 | #!/bin/bash | ||
2 | |||
3 | set -e | ||
4 | |||
5 | onexit() { | ||
6 | export PREVLEVEL=$RUNLEVEL RUNLEVEL=1 | ||
7 | /etc/init.d/rc 1 | ||
8 | # Turn services back off | ||
9 | echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d | ||
10 | rm -f /etc/init.d/.legacy-bootordering | ||
11 | } | ||
12 | trap onexit EXIT | ||
13 | |||
14 | rm -f /usr/sbin/policy-rc.d | ||
15 | |||
16 | if [[ -e /etc/docker-init/runtime/settings.sh ]]; then | ||
17 | . /etc/docker-init/runtime/settings.sh | ||
18 | fi | ||
19 | |||
20 | if [[ $UID && $GID ]]; then | ||
21 | addgroup --gid $GID hostuser | ||
22 | adduser --disabled-password --uid $UID --gid $GID --gecos "" hostuser | ||
23 | fi | ||
24 | |||
25 | for pre_config_service in /etc/docker-init/runtime/pre-config/*.sh; do | ||
26 | [[ -r $pre_config_service ]] || continue | ||
27 | ( | ||
28 | . "$pre_config_service" | ||
29 | ) | ||
30 | done | ||
31 | touch /etc/init.d/.legacy-bootordering | ||
32 | export RUNLEVEL=2 PREVLEVEL= | ||
33 | /etc/init.d/rc 2 | ||
34 | |||
35 | if [[ $# -gt 0 ]]; then | ||
36 | "$@" | ||
37 | else | ||
38 | tail -f /var/log/syslog | ||
39 | fi |
-
Please register or sign in to post a comment