summaryrefslogtreecommitdiffstats
path: root/modules.d
diff options
context:
space:
mode:
authorSimon Rettberg2025-11-21 16:57:44 +0100
committerSimon Rettberg2025-11-21 16:57:44 +0100
commit08b956b1ee14e033c3e16082d8386d3ae54496fc (patch)
tree5920a0fd7a95e7e792d03be3f759e53eb1c6ab43 /modules.d
parent[busybox] Try random server if busybox.net is securwebinfot (diff)
downloadsystemd-init-08b956b1ee14e033c3e16082d8386d3ae54496fc.tar.gz
systemd-init-08b956b1ee14e033c3e16082d8386d3ae54496fc.tar.xz
systemd-init-08b956b1ee14e033c3e16082d8386d3ae54496fc.zip
Update dracut to 109
Diffstat (limited to 'modules.d')
-rwxr-xr-xmodules.d/busybox/hooks/s3-install-busybox.sh9
-rwxr-xr-xmodules.d/busybox/module-setup.sh12
-rwxr-xr-xmodules.d/conf-tgz/hooks/s3-unpack-config-tgz.sh5
-rwxr-xr-xmodules.d/slx-extra-script/hooks/s3-extra-script.sh2
-rwxr-xr-xmodules.d/slx-network/hooks/s3-parse-network-kcl.sh8
5 files changed, 22 insertions, 14 deletions
diff --git a/modules.d/busybox/hooks/s3-install-busybox.sh b/modules.d/busybox/hooks/s3-install-busybox.sh
deleted file mode 100755
index 38a90ece..00000000
--- a/modules.d/busybox/hooks/s3-install-busybox.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash
-
-if busybox --install -s; then
- echo "Busybox installed."
- exit 0
-fi
-
-echo "Busybox install failed."
-exit 1
diff --git a/modules.d/busybox/module-setup.sh b/modules.d/busybox/module-setup.sh
index 1a17ee78..f93d304e 100755
--- a/modules.d/busybox/module-setup.sh
+++ b/modules.d/busybox/module-setup.sh
@@ -43,8 +43,16 @@ install() {
derror "Could not install busybox"
return 1
fi
- slx_service "s3-install-busybox" "Install busybox applet symlinks" \
- --wbefore "dracut-cmdline.service"
+ # manually install, /bin etc. are read-only in initrd
+ local applet
+ for applet in $("${moddir}/src/busybox" --listfull); do
+ if [ -e "${initdir}/${applet}" ]; then
+ # real tool probably exists
+ continue
+ fi
+ ln -sfn /bin/busybox "${initdir}/${applet}" \
+ || dwarn "Could not install busybox applet: $applet"
+ done
slx_service "s3-install-busybox-stage4" "Install busybox into stage 4" \
--wafter "initrd-root-fs.target" \
--after "s3-install-busybox.service"
diff --git a/modules.d/conf-tgz/hooks/s3-unpack-config-tgz.sh b/modules.d/conf-tgz/hooks/s3-unpack-config-tgz.sh
index 7bc93a69..ba5178a4 100755
--- a/modules.d/conf-tgz/hooks/s3-unpack-config-tgz.sh
+++ b/modules.d/conf-tgz/hooks/s3-unpack-config-tgz.sh
@@ -1,6 +1,9 @@
#!/bin/ash
# -*- coding: utf-8 -*-
+. /etc/openslx
+[ -n "$SLX_NO_CONFIG_TGZ" ] && exit 0
+
# tarcopy <source_dir> <target_dir>
tarcopy() (
if ! [ -d "$1" ] || ! [ -d "$2" ]; then
@@ -36,12 +39,12 @@ if ! tar \
exit 1
fi
# check SLX_LOCAL_CONFIG
-. "/etc/openslx"
if [ -n "$SLX_LOCAL_CONFIG" ]; then
for mod in $SLX_LOCAL_CONFIG; do
if [ ! -d "${extract_dir}/openslx-configs/${mod}" ]; then
echo "Ignoring missing mod '$mod' in config.tgz"
else
+ echo "Unpacking '$mod' from config.tgz"
tarcopy \
"${extract_dir}/openslx-configs/${mod}" \
"${extract_dir}"
diff --git a/modules.d/slx-extra-script/hooks/s3-extra-script.sh b/modules.d/slx-extra-script/hooks/s3-extra-script.sh
index 7ac293ee..1f700275 100755
--- a/modules.d/slx-extra-script/hooks/s3-extra-script.sh
+++ b/modules.d/slx-extra-script/hooks/s3-extra-script.sh
@@ -3,6 +3,6 @@
. /etc/openslx
[ -z "$SLX_EXTRA_SCRIPT_URL" ] && exit 0
-slx-tools download_retry --slx-time 20 -sS "$SLX_EXTRA_SCRIPT_URL" > /etc/extra-init || exit 1
+slx-tools download_retry --slx-time 20 -sS --insecure "$SLX_EXTRA_SCRIPT_URL" > /etc/extra-init || exit 1
chmod +x /etc/extra-init
exec /etc/extra-init pre-dmsetup
diff --git a/modules.d/slx-network/hooks/s3-parse-network-kcl.sh b/modules.d/slx-network/hooks/s3-parse-network-kcl.sh
index 37dc7814..84398150 100755
--- a/modules.d/slx-network/hooks/s3-parse-network-kcl.sh
+++ b/modules.d/slx-network/hooks/s3-parse-network-kcl.sh
@@ -9,7 +9,7 @@
command -v getarg >/dev/null || . /lib/dracut-lib.sh
# static names for the boot interface and its bridge
-declare -rg bootif_name="boot0"
+declare -g bootif_name="boot0"
declare -rg bridge_name="br0"
# parse old syslinux style 'ip=...' and 'BOOTIF=...' parameters
@@ -52,6 +52,12 @@ parse_kcl() {
parse_kcl_ip
parse_kcl_ipv4
+ local kcl_bootif_name="$(getarg bootif_name=)"
+ if [ -n "$kcl_bootif_name" ]; then
+ declare -g bootif_name="$kcl_bootif_name"
+ fi
+ readonly bootif_name
+
# if not boot server was given, use slxsrv
if [ -z "$bootsrv" ]; then
kclsrv="$(getarg slxsrv=)"