Switch to non-PID1 init
This commit is contained in:
parent
deb70725bb
commit
7f8a16da8a
|
@ -1,5 +1,5 @@
|
||||||
FROM alpine
|
FROM alpine
|
||||||
RUN apk update
|
RUN apk add --no-cache alpine-conf doas runit openssh-server
|
||||||
RUN apk add alpine-conf doas runit openssh-server
|
|
||||||
COPY etc/ /etc/
|
COPY etc/ /etc/
|
||||||
CMD [ "/sbin/runit" ]
|
COPY /sbin /sbin/
|
||||||
|
CMD [ "/sbin/toolbox-init" ]
|
||||||
|
|
10
README.md
10
README.md
|
@ -40,6 +40,16 @@ Once set up,
|
||||||
you should be able to ssh in for most of your needs.
|
you should be able to ssh in for most of your needs.
|
||||||
|
|
||||||
|
|
||||||
|
Startup scripts
|
||||||
|
---------------
|
||||||
|
|
||||||
|
The system uses [runit](http://smarden.org/runit/).
|
||||||
|
If you drop an executable in `/etc/service/*/run`,
|
||||||
|
runit will run it.
|
||||||
|
|
||||||
|
Be sure to `lbu commit` if you're making startup scripts.
|
||||||
|
|
||||||
|
|
||||||
Podman vs Docker
|
Podman vs Docker
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
-/etc/apk/protected_paths.d/toolbox.list
|
||||||
|
-/etc/service/*/supervise
|
||||||
|
-/etc/service/*/log/supervise
|
|
@ -1,3 +0,0 @@
|
||||||
#! /bin/sh
|
|
||||||
|
|
||||||
exec /sbin/runsvdir /etc/service
|
|
|
@ -1,3 +0,0 @@
|
||||||
#! /bin/sh
|
|
||||||
|
|
||||||
echo "*** Goodbye."
|
|
|
@ -1,5 +1,8 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
|
|
||||||
|
exec > /var/log/boot.log
|
||||||
|
exec 2>&1
|
||||||
|
|
||||||
error () {
|
error () {
|
||||||
printf '\033[31mFLAGRANT SYSTEM ERROR\033[0m - %s' "$*" >> /etc/motd
|
printf '\033[31mFLAGRANT SYSTEM ERROR\033[0m - %s' "$*" >> /etc/motd
|
||||||
}
|
}
|
||||||
|
@ -13,8 +16,11 @@ apkovl=/mnt/toolbox/lbu/$(hostname).apkovl.tar.gz
|
||||||
if [ -f $apkovl ]; then
|
if [ -f $apkovl ]; then
|
||||||
tar xf $apkovl || error "restoring system: untar $apkovl failed"
|
tar xf $apkovl || error "restoring system: untar $apkovl failed"
|
||||||
else
|
else
|
||||||
echo "$apkovl missing, skipping restore"
|
echo "$apkovl missing; run 'lbu commit' to create it"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "*** Updating packages"
|
echo "*** Updating packages"
|
||||||
apk fix
|
apk fix
|
||||||
|
|
||||||
|
echo "*** Handing off to runsvdir"
|
||||||
|
exec /sbin/runsvdir /etc/service
|
Loading…
Reference in New Issue