Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/etc/ignity/init/00-container-discover
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/bin/execlineb -P
foreground { s6-echo "Operating system info" }
foreground { redirfd -r 0 /proc/version s6-cat }
foreground { container-discover }
2 changes: 1 addition & 1 deletion src/etc/s6/boot/stage2
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ foreground {
# option, there is no clean way to allow symlinks between user provided runcoms.
if { s6-hiercopy /etc/ignity/${i} /run/ignity/${i} }
}
importas -u ? ? if { s6-echo -- " exited ${?}." }
importas -u ? ?
exit ${?}
}

Expand Down
1 change: 0 additions & 1 deletion src/etc/s6/boot/stage2-envs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ if {
importas -ui d d
backtick -n i { s6-basename "${d}" }
importas -ui file i
if { s6-echo -- "[supervisor/env] Loading environment file: ${file}..." }
redirfd -r 0 /etc/ignity/envs/${file} load-envfile
if { s6-dumpenv "/run/ignity/envs" }
}
Expand Down
6 changes: 2 additions & 4 deletions src/etc/s6/boot/stage2-init
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,18 @@

if {
if -t { eltest -d /run/ignity/init }
if { s6-echo "[supervisor/init] Executing container init scripts" }
if { s6-echo "[supervisor/init] Executing environment init scripts" }
if {
elglob -s -0 g "/run/ignity/init/*"
forx -o 0 d { ${g} }
importas -ui d d
backtick -n i { s6-basename "${d}" }
importas -ui i i
if { s6-echo -- "[supervisor/init] Executing init script: ${i}..." }
foreground { /run/ignity/init/${i} }
importas -u ? ?
if { s6-echo -- "[supervisor/init] Init script ${i} exited ${?}." }
exit ${?}
}
if { s6-echo -- "[supervisor/init] Init scripts executed" }
if { s6-echo -- "[supervisor/init] Environment init scripts executed" }
}

$@
8 changes: 4 additions & 4 deletions src/etc/s6/boot/stage3
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,20 @@ foreground {
}

# Kill everything, gently.
foreground { s6-echo "[supervisor/finalize] Sending all processes the KILL signal" }
foreground { s6-nuke -th } # foreground is process 1: it survives
foreground { s6-echo "[supervisor/finalize] Sending all processes the termination signals" }
foreground { redirfd -a 2 /dev/null redirfd -a 1 /dev/null s6-nuke -th } # foreground is process 1: it survives
foreground {
importas -D 3000 -u IGNITY_KILL_GRACETIME IGNITY_KILL_GRACETIME
s6-sleep -m -- ${IGNITY_KILL_GRACETIME}
}

# Last message, then close our pipes and give the logger some time.
foreground { s6-echo "[supervisor/finalize] Sending all processes the KILL signal and exiting" }
foreground { s6-echo "[supervisor/finalize] Sending all processes the kill signal and exiting" }
fdclose 1 fdclose 2
s6-sleep -m 200

# Kill everything, brutally.
foreground { s6-nuke -k } # foreground is process 1: it survives again
foreground { redirfd -a 2 /dev/null redirfd -a 1 /dev/null s6-nuke -k } # foreground is process 1: it survives again

# Reap all the zombies then sync, and we're done.
wait { }
Expand Down
4 changes: 1 addition & 3 deletions src/etc/s6/boot/stage3-finalize
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,18 @@
importas -D 5000 -u IGNITY_KILL_FINALIZE_MAXTIME IGNITY_KILL_FINALIZE_MAXTIME
if {
if -t { eltest -d /run/ignity/finalize }
if { s6-echo "[supervisor/finalize] Executing container finalize scripts..." }
if { s6-echo "[supervisor/finalize] Executing environment finalize scripts..." }
if {
elglob -s -0 g "/run/ignity/finalize/*"
forx -o 0 d { ${g} }
importas -ui d d
backtick -n i { s6-basename "${d}" }
importas -ui i i
if { s6-echo -- "[supervisor/finalize] Executing finalize script: ${i}... " }
foreground {
s6-maximumtime -k ${IGNITY_KILL_FINALIZE_MAXTIME}
/run/ignity/finalize/${i}
}
importas -u ? ?
s6-echo -- "[supervisor/finalize] Finalize script ${i} exited ${?}."
}
s6-echo -- "[supervisor/finalize] Finalize scripts executed"
}
Expand Down
110 changes: 0 additions & 110 deletions src/usr/bin/container-discover

This file was deleted.

2 changes: 0 additions & 2 deletions src/usr/bin/preboot
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,8 @@ if {
importas -ui d d
backtick -n i { s6-basename "${d}" }
importas -ui i i
if { s6-echo -- "[supervisor/perm] Applying ownership & permission fixes: ${i}... " }
foreground { redirfd -r 0 /etc/ignity/perms/${i} fix-perms }
importas -u ? ?
if { s6-echo -- "[supervisor/perm] Ownership & permission fixes ${i} exited ${?}." }
exit ${?}
}
if { s6-echo -- "[supervisor/perm] Ownership & permissions fixes applied" }
Expand Down
8 changes: 4 additions & 4 deletions src/usr/src/install-ignity.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ readonly SKALIBS_URL="https://github.com/skarnet/skalibs.git"
readonly EXECLINE_URL="https://github.com/skarnet/execline.git"
readonly S6_URL="https://github.com/skarnet/s6.git"
readonly S6_PORTABLE_UTILS_URL="https://github.com/skarnet/s6-portable-utils.git"
readonly SKALIBS_VERSION="2.14.3.0"
readonly EXECLINE_VERSION="2.9.6.1"
readonly S6_VERSION="2.13.1.0"
readonly S6_PORTABLE_UTILS_VERSION="2.3.0.4"
readonly SKALIBS_VERSION="2.14.4.0"
readonly EXECLINE_VERSION="2.9.7.0"
readonly S6_VERSION="2.13.2.0"
readonly S6_PORTABLE_UTILS_VERSION="2.3.1.0"
BUILD_DEPENDENCIES="ca-certificates build-essential git"

# Fine tuning
Expand Down
5 changes: 0 additions & 5 deletions tests/boot/tests.bats
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ export DOCKER_ARGS="-e IGNITY_KILL_GRACETIME=0 -e IGNITY_KILL_FINALIZE_MAXTIME=0
[ "$?" -eq 0 ]
}

@test "check container-discover is installed" {
echo 'command -v container-discover' | podman::run
[ "$?" -eq 0 ]
}

@test "check fix-perms is installed" {
echo 'command -v fix-perms' | podman::run
[ "$?" -eq 0 ]
Expand Down