HEX
Server: nginx/1.29.3
System: Linux mail.sarafai.ru 6.1.0-40-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.153-1 (2025-09-20) x86_64
User: www-data (33)
PHP: 7.4.33
Disabled: dl,exec,passthru,shell_exec,system,proc_open,popen,parse_ini_file,show_source
Upload Files
File: //lib/kernel/install.d/85-initrd.install
#!/bin/sh
set -eu
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

COMMAND="$1"
KERNEL_VERSION="$2"

INITRD_SRC="/boot/initrd.img-$KERNEL_VERSION"

[ "$COMMAND" = add ] || exit 0

if [ "$#" -ge 5 ]; then
    # Explicit initrd paths were passed, fall through to default 90-loaderentry.install handling;
    # we'd be either injecting an unwanted image or, worse, overriding a user-provided one
    exit 0
fi

if [ -e "$INITRD_SRC" ]; then
    [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && echo "Installing '$INITRD_SRC'"
    ln -fs "$INITRD_SRC" "$KERNEL_INSTALL_STAGING_AREA"
else
    echo "$INITRD_SRC does not exist, not installing an initrd"
fi

exit 0