From b53b454b72a4fc96e86f03bbdb71bd59852568e3 Mon Sep 17 00:00:00 2001 From: torben Date: Thu, 6 Sep 2018 10:25:52 +0200 Subject: Imptrove boot process performance. --- .../dnbd-root-filesystem/hooks/shutdown-umount.sh | 2 ++ .../hooks/update-boot-files.sh | 9 -------- ...twork-configuration-to-systemd-service-files.sh | 24 ++++++++++++++-------- modules.d/systemd-networkd-ext/module-setup.sh | 9 +++++++- 4 files changed, 25 insertions(+), 19 deletions(-) diff --git a/modules.d/dnbd-root-filesystem/hooks/shutdown-umount.sh b/modules.d/dnbd-root-filesystem/hooks/shutdown-umount.sh index ae57e673..ae6d2a0b 100755 --- a/modules.d/dnbd-root-filesystem/hooks/shutdown-umount.sh +++ b/modules.d/dnbd-root-filesystem/hooks/shutdown-umount.sh @@ -1,6 +1,8 @@ #!/usr/bin/env bash source /usr/lib/configure-logging.sh bl.exception.try { + # TODO + exit 0 # NOTE: Calling "umount" on "/oldroot" results in "target is busy." error # if we do not change current working directory to current root. cd / diff --git a/modules.d/dnbd-root-filesystem/hooks/update-boot-files.sh b/modules.d/dnbd-root-filesystem/hooks/update-boot-files.sh index 86a99e04..63d09bd0 100755 --- a/modules.d/dnbd-root-filesystem/hooks/update-boot-files.sh +++ b/modules.d/dnbd-root-filesystem/hooks/update-boot-files.sh @@ -164,15 +164,6 @@ bl.exception.try { of="$device_path" \ seek=TODO else - echo - echo - echo "$device_path" - fdisk --list "$device_path" - fdisk --list "$device_path" | \ - grep --extended-regexp "^$device_partition_path +\*" || \ - echo $? - echo - echo if ! fdisk --list "$device_path" | \ grep --extended-regexp "^$device_partition_path +\*" &>/dev/null then diff --git a/modules.d/systemd-networkd-ext/hooks/convert-kcl-network-configuration-to-systemd-service-files.sh b/modules.d/systemd-networkd-ext/hooks/convert-kcl-network-configuration-to-systemd-service-files.sh index 308a3e38..722127d4 100755 --- a/modules.d/systemd-networkd-ext/hooks/convert-kcl-network-configuration-to-systemd-service-files.sh +++ b/modules.d/systemd-networkd-ext/hooks/convert-kcl-network-configuration-to-systemd-service-files.sh @@ -158,16 +158,22 @@ EOF ) > "/etc/systemd/network/$BOOTIF_NAME.link" fi if [ "$WIRELESS_BOOTIF" = false ]; then - if \ - rm \ - --force \ - /usr/lib/systemd/system/network.target.wants/iwd.service \ - &>/dev/null || - rm \ - --force \ - /usr/lib/systemd/system/network.target.wants/wpa_supplicant@* \ - &>/dev/null + local reload=fals + if rm \ + --force \ + /usr/lib/systemd/system/network.target.wants/iwd.service \ + &>/dev/null then + reload=true + fi + if rm \ + --force \ + /usr/lib/systemd/system/network.target.wants/wpa_supplicant@* \ + &>/dev/null + then + reload=true + fi + if $reload; then systemctl daemon-reload fi else diff --git a/modules.d/systemd-networkd-ext/module-setup.sh b/modules.d/systemd-networkd-ext/module-setup.sh index dac8d3e5..f2edbef0 100755 --- a/modules.d/systemd-networkd-ext/module-setup.sh +++ b/modules.d/systemd-networkd-ext/module-setup.sh @@ -342,6 +342,9 @@ install() { local path cat << EOF source /usr/lib/configure-logging.sh +source /run/openslx/pxe-network.conf +source /etc/openslx + file_paths=( EOF for path in $(bl.dependency.determine_files wpa_supplicant); do @@ -369,7 +372,11 @@ EOF inst_hook pre-mount 00 "$moddir/hooks/wait-for-network.sh" cat << EOF ) -if [ ! -f /mnt/slx_writable_device/booted_to_wlan ]; then +if \\ + [ ! -f /mnt/slx_writable_device/booted_to_wlan ] && \\ + [[ "\$SLX_WIRELESS_MAC" != false ]] || + \$SLX_WRITABLE_DEVICE_REMOVE_CACHE +then for path in "\${file_paths[@]}"; do if ! [ -d "\$NEWROOT\$(dirname "\$path")" ]; then mkdir --parents "\$NEWROOT\$(dirname "\$path")" -- cgit v1.2.3-55-g7522