diff options
Diffstat (limited to 'modules.d/slx-addons/hooks/s3-setup-addons.sh')
-rwxr-xr-x | modules.d/slx-addons/hooks/s3-setup-addons.sh | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/modules.d/slx-addons/hooks/s3-setup-addons.sh b/modules.d/slx-addons/hooks/s3-setup-addons.sh index 0a947f23..495e3799 100755 --- a/modules.d/slx-addons/hooks/s3-setup-addons.sh +++ b/modules.d/slx-addons/hooks/s3-setup-addons.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/bin/bash # # Stage4 addons setup script # @@ -25,12 +25,10 @@ # or by chroot'ing into the stage4 before executing it. ### CURRENTLY NOT EXECUTED: Since whiteouts could be handled for _all_addons -type emergency_shell >/dev/null 2>&1 || . /lib/dracut-lib.sh - # Check if we even have any addons to process -if [ ! -d "$NEWROOT/opt/openslx/addons" ]; then - info "No stage4 addons found." - return 0 +if ! [ -d "$NEWROOT/opt/openslx/addons" ]; then + echo "No stage4 addons found." + exit 0 fi # This just activates the ldconfig service to run during the sysinit target @@ -47,13 +45,13 @@ activate_stage4_ldconfig() { setup_addon() { if [ ! -d "$1" ]; then - warn "Given '$1' not a directory, skipping." + echo "Given '$1' not a directory, skipping." return 1 fi local addon_dir="$1" cd "$addon_dir" || return 1 if ! bash addon-required 2>&1 ; then - info "'$addon_dir/addon-required' missing or returned non-zero, skipping..." + echo "'$addon_dir/addon-required' missing or returned non-zero, skipping..." return 1 fi # purge addon-* files @@ -82,7 +80,7 @@ active=() for addon in "${NEWROOT}/opt/openslx/addons/"*; do if setup_addon "$addon"; then active+=("${addon#"${NEWROOT}/opt/openslx/addons/"}") - info "Activated '$addon' (@ $(date +%s))" + echo "Activated '$addon' (@ $(date +%s))" fi done @@ -91,13 +89,13 @@ done if [ "${#active[@]}" -eq 1 ]; then addon_cache="${NEWROOT}/opt/openslx/etc/${active[0]}.ld.so.cache" if [ -e "$addon_cache" ]; then - info "Using ld.so.cache of '${active[0]}'." + echo "Using ld.so.cache of '${active[0]}'." mv -f -- "${NEWROOT}/etc/ld.so.cache"{,.stage4} mv -f -- "$addon_cache" "${NEWROOT}/etc/ld.so.cache" fi elif [ "${#active[@]}" -gt 1 ]; then - info "Activating ldconfig in stage4 due to multiple loaded addons: ${active[*]}" + echo "Activating ldconfig in stage4 due to multiple loaded addons: ${active[*]}" activate_stage4_ldconfig fi -: +exit 0 |