From: наб Date: Thu, 16 Dec 2021 13:35:17 +0000 (+0100) Subject: kernel-install: 50-depmod: port to /bin/sh X-Git-Tag: v251-rc1~507^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b3ceb3d9fff69b33b8665a0137f5177f72c45cc0;p=thirdparty%2Fsystemd.git kernel-install: 50-depmod: port to /bin/sh --- diff --git a/src/kernel-install/50-depmod.install b/src/kernel-install/50-depmod.install index 2fd959865f2..aa1f6b8e0ef 100644 --- a/src/kernel-install/50-depmod.install +++ b/src/kernel-install/50-depmod.install @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/bin/sh # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- # ex: ts=8 sw=4 sts=4 et filetype=sh # SPDX-License-Identifier: LGPL-2.1-or-later @@ -20,23 +20,25 @@ COMMAND="$1" KERNEL_VERSION="$2" -ENTRY_DIR_ABS="$3" -KERNEL_IMAGE="$4" -INITRD_OPTIONS_START="5" - -[[ $KERNEL_VERSION ]] || exit 1 case "$COMMAND" in add) - [[ -d "/lib/modules/${KERNEL_VERSION}/kernel" ]] || exit 0 - [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && \ - echo "Running depmod -a ${KERNEL_VERSION}" - exec depmod -a "${KERNEL_VERSION}" + [ -d "/lib/modules/$KERNEL_VERSION/kernel" ] || exit 0 + [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && echo "+depmod -a $KERNEL_VERSION" + exec depmod -a "$KERNEL_VERSION" ;; remove) - [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && \ - echo "Removing /lib/modules/${KERNEL_VERSION}/modules.dep and associated files" - exec rm -f /lib/modules/"${KERNEL_VERSION}"/modules.{alias{,.bin},builtin.bin,dep{,.bin},devname,softdep,symbols{,.bin}} + [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && echo "Removing /lib/modules/$KERNEL_VERSION/modules.dep and associated files" + exec rm -f \ + "/lib/modules/$KERNEL_VERSION/modules.alias" \ + "/lib/modules/$KERNEL_VERSION/modules.alias.bin" \ + "/lib/modules/$KERNEL_VERSION/modules.builtin.bin" \ + "/lib/modules/$KERNEL_VERSION/modules.dep" \ + "/lib/modules/$KERNEL_VERSION/modules.dep.bin" \ + "/lib/modules/$KERNEL_VERSION/modules.devname" \ + "/lib/modules/$KERNEL_VERSION/modules.softdep" \ + "/lib/modules/$KERNEL_VERSION/modules.symbols" \ + "/lib/modules/$KERNEL_VERSION/modules.symbols.bin" ;; *) exit 0