This is analogous to a change in mkosi[1] with the same motivation: some scripts are run to bootstrap the distribution tree and are thus running directly on the host system which may not have `/bin/bash` (e.g. NixOS). As with the `mkosi` change, do that for each shebang for consistency reasons. [1] https://github.com/systemd/mkosi/commit/8d2cd50e5192cada7211724ecff3514f0c85cf0f
19 lines
541 B
Bash
Executable File
19 lines
541 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -e
|
|
|
|
# We don't use mkosi.extra because /usr/sbin could be a symlink and cp doesn't handle that properly until
|
|
# coreutils 9.5 or newer.
|
|
mkdir -p "$BUILDROOT/sbin"
|
|
rm -f "$BUILDROOT/sbin/init"
|
|
cat >"$BUILDROOT/sbin/init" <<EOF
|
|
#!/usr/bin/env bash
|
|
echo "Hello from dummy init, beautiful day, innit?"
|
|
ip link
|
|
EOF
|
|
chmod +x "$BUILDROOT/sbin/init"
|
|
|
|
# Arch relies on tmpfiles.d/etc.conf but this image isn't booted
|
|
if [ ! -e "$BUILDROOT/etc/os-release" ]; then
|
|
ln -s ../usr/lib/os-release "$BUILDROOT/etc/os-release"
|
|
fi
|