📁
SKYSHELL MANAGER
PHP v8.0.30
Create
Create
Path:
root
/
home
/
godaofbq
/
hyperredbed.com
/
wp-includes
/
Name
Size
Perm
Actions
📁
ID3
-
0755
🗑️
🏷️
🔒
📁
IXR
-
0755
🗑️
🏷️
🔒
📁
PHPMailer
-
0755
🗑️
🏷️
🔒
📁
Requests
-
0755
🗑️
🏷️
🔒
📁
SimplePie
-
0755
🗑️
🏷️
🔒
📁
Text
-
0755
🗑️
🏷️
🔒
📁
abilities-api
-
0755
🗑️
🏷️
🔒
📁
ai-client
-
0755
🗑️
🏷️
🔒
📁
assets
-
0755
🗑️
🏷️
🔒
📁
block-bindings
-
0755
🗑️
🏷️
🔒
📁
block-patterns
-
0755
🗑️
🏷️
🔒
📁
block-supports
-
0755
🗑️
🏷️
🔒
📁
blocks
-
0755
🗑️
🏷️
🔒
📁
build
-
0755
🗑️
🏷️
🔒
📁
certificates
-
0755
🗑️
🏷️
🔒
📁
css
-
0755
🗑️
🏷️
🔒
📁
customize
-
0755
🗑️
🏷️
🔒
📁
fonts
-
0755
🗑️
🏷️
🔒
📁
html-api
-
0755
🗑️
🏷️
🔒
📁
images
-
0755
🗑️
🏷️
🔒
📁
interactivity-api
-
0755
🗑️
🏷️
🔒
📁
js
-
0755
🗑️
🏷️
🔒
📁
l10n
-
0755
🗑️
🏷️
🔒
📁
php-ai-client
-
0755
🗑️
🏷️
🔒
📁
php-compat
-
0755
🗑️
🏷️
🔒
📁
pomo
-
0755
🗑️
🏷️
🔒
📁
rest-api
-
0755
🗑️
🏷️
🔒
📁
sitemaps
-
0755
🗑️
🏷️
🔒
📁
sodium_compat
-
0755
🗑️
🏷️
🔒
📁
style-engine
-
0755
🗑️
🏷️
🔒
📁
widgets
-
0755
🗑️
🏷️
🔒
📄
abilities-api.php
23.8 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
abilities.php
7.82 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
admin-bar.php
38.39 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
ai-client.php
2.49 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
atomlib.php
11.9 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
block-bindings.php
7.35 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
block-i18n.json
0.31 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
block-template-utils.php
61.33 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
blocks.php
116.64 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
bookmark-template.php
12.47 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
bookmark.php
15.07 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
cache-compat.php
10.76 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
canonical.php
33.83 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
capabilities.php
42.61 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
category-template.php
55.65 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
category.php
12.53 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-avif-info.php
29.3 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-feed.php
0.53 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-json.php
42.65 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-phpmailer.php
0.65 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-requests.php
2.18 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-simplepie.php
0.44 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-smtp.php
0.45 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-snoopy.php
36.83 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-walker-category.php
8.28 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-walker-nav-menu.php
11.76 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-walker-page-dropdown.php
2.65 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-walker-page.php
7.43 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-admin-bar.php
17.58 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-ajax-response.php
5.14 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-block-bindings-registry.php
8.07 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-block-bindings-source.php
2.92 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-block-parser-block.php
2.5 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-block-parser-frame.php
1.95 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-block-parser.php
11.25 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-block-pattern-categories-registry.php
4.28 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-block-styles-registry.php
6.27 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-block-supports.php
6.4 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-block-type-registry.php
4.91 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-block-type.php
16.83 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-block.php
24.14 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-classic-to-block-menu-converter.php
3.93 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-comment-query.php
47.49 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-comment.php
9.15 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-customize-control.php
25.51 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-customize-manager.php
198.13 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-customize-nav-menus.php
56.61 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-customize-widgets.php
70.89 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-date-query.php
35.13 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-dependencies.php
16.69 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-dependency.php
2.59 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-duotone.php
39.95 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-embed.php
15.54 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-exception.php
0.25 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-fatal-error-handler.php
7.96 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-feed-cache-transient.php
3.23 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-http-requests-hooks.php
1.97 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-icons-registry.php
7.67 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-image-editor-gd.php
20.22 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-image-editor-imagick.php
36.11 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-image-editor.php
17.01 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-list-util.php
7.27 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-locale-switcher.php
6.62 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-locale.php
16.45 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-matchesmapregex.php
1.79 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-meta-query.php
29.79 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-metadata-lazyloader.php
6.67 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-navigation-fallback.php
8.98 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-network.php
12.01 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-plugin-dependencies.php
24.59 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-post-type.php
29.95 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-recovery-mode-cookie-service.php
6.72 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-recovery-mode-link-service.php
3.44 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-rewrite.php
62.2 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-role.php
2.46 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-session-tokens.php
7.15 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-simplepie-file.php
3.47 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-site-query.php
30.74 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-speculation-rules.php
7.38 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-styles.php
13.04 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-term-query.php
39.8 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-theme-json-resolver.php
34.86 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-theme-json-schema.php
7.19 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-url-pattern-prefixer.php
4.69 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-user-request.php
2.25 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-widget-factory.php
3.27 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-xmlrpc-server.php
209.98 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class.wp-dependencies.php
0.36 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class.wp-styles.php
0.33 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
comment-template.php
100.79 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
compat.php
15.69 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
cron.php
43.94 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
date.php
0.39 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
default-filters.php
36.54 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
error_log
16.27 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
feed-atom.php
3.05 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
feed-rdf.php
2.61 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
feed-rss.php
1.16 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
filefuns.php
5.92 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
fonts.php
9.56 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
functions.php
283.52 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
functions.wp-styles.php
8.45 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
general-template.php
170.83 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
index.php
6.83 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
kses.php
81.03 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
l10n.php
69.74 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
link-template.php
156.39 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
load.php
55.15 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
locale.php
0.16 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
media-template.php
61.79 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
media.php
219.66 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
meta.php
65.17 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
ms-blogs.php
25.71 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
ms-default-constants.php
4.81 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
ms-default-filters.php
6.48 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
ms-deprecated.php
21.24 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
ms-files.php
6.83 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
ms-network.php
3.69 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
ms-site.php
40.75 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
nav-menu-template.php
25.38 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
nav-menu.php
43.23 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
option.php
102.62 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
panel.php
6.83 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
post-formats.php
6.9 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
post-template.php
67.01 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
post.php
289.58 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
registration-functions.php
0.2 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
revision.php
29.99 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
rewrite.php
19 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
robots-template.php
5.06 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
rss-functions.php
0.25 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
rss.php
22.66 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
shortcodes.php
23.47 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
sitemaps.php
3.16 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
spl-autoload-compat.php
0.43 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
style-engine.php
7.39 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
template-loader.php
4.17 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
test.php
6.83 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
theme-i18n.json
1.85 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
theme-previews.php
2.82 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
theme.json
8.83 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
update.php
37.38 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
vars.php
6.45 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
view-transitions.php
0.59 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
widgets.php
69.17 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
wp-db.php
0.43 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
wp-load.php
6.83 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
Edit: kernel-install
#!/usr/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 # # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # # systemd is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License # along with systemd; If not, see <https://www.gnu.org/licenses/>. skip_remaining=77 set -e usage() { echo "Usage:" echo " kernel-install [OPTIONS...] add KERNEL-VERSION KERNEL-IMAGE [INITRD-FILE...]" echo " kernel-install [OPTIONS...] remove KERNEL-VERSION [--entry-type...]" echo " kernel-install [OPTIONS...] inspect" echo "Options:" echo " --entry-type type1|type2|all" echo " Operate only on the specified bootloader entry type" echo " -h, --help Print this help and exit" echo " --version Print version string and exit" echo " -v, --verbose Increase verbosity" } dropindirs_sort() { suffix="$1" shift for d; do for i in "$d/"*"$suffix"; do [ -e "$i" ] && echo "${i##*/}" done done | sort -Vu | while read -r f; do for d; do if [ -e "$d/$f" ]; then [ -x "$d/$f" ] && echo "$d/$f" continue 2 fi done done } export LC_COLLATE=C for i; do if [ "$i" = "--help" ] || [ "$i" = "-h" ]; then usage exit 0 fi done for i; do if [ "$i" = "--version" ]; then echo "kernel-install 252 (252-67.el9_8.4.alma.1)" exit 0 fi done if [ "$KERNEL_INSTALL_BYPASS" = "1" ]; then echo "kernel-install: Skipping execution because KERNEL_INSTALL_BYPASS=1" exit 0 fi export KERNEL_INSTALL_VERBOSE=0 if [ "$1" = "--verbose" ] || [ "$1" = "-v" ]; then shift export KERNEL_INSTALL_VERBOSE=1 log_verbose() { printf "%s\n" "$*"; } else log_verbose() { :; } fi if [ "${0##*/}" = "installkernel" ]; then COMMAND=add # kernel's install.sh invokes us as # /sbin/installkernel <version> <vmlinuz> <map> <installation-dir> # We ignore the last two arguments. set -- "${1:?}" "${2:?}" else COMMAND="$1" [ $# -ge 1 ] && shift fi if [ "$COMMAND" = "inspect" ]; then KERNEL_VERSION="" else if [ $# -lt 1 ]; then echo "Error: not enough arguments" >&2 exit 1 fi KERNEL_VERSION="$1" shift fi # These two settings are only settable via install.conf layout= initrd_generator= # These two settings can be inherited from the environment _MACHINE_ID_SAVED="$MACHINE_ID" _BOOT_ROOT_SAVED="$BOOT_ROOT" if [ -n "$KERNEL_INSTALL_CONF_ROOT" ]; then install_conf="$KERNEL_INSTALL_CONF_ROOT/install.conf" elif [ -f "/etc/kernel/install.conf" ]; then install_conf="/etc/kernel/install.conf" elif [ -f "/usr/lib/kernel/install.conf" ]; then install_conf="/usr/lib/kernel/install.conf" else install_conf= fi if [ -f "$install_conf" ]; then log_verbose "Reading $install_conf…" # shellcheck source=/dev/null . "$install_conf" fi [ -n "$layout" ] && log_verbose "$install_conf configures layout=$layout" [ -n "$initrd_generator" ] && \ log_verbose "$install_conf configures initrd_generator=$initrd_generator" if [ -n "$_MACHINE_ID_SAVED" ]; then MACHINE_ID="$_MACHINE_ID_SAVED" log_verbose "MACHINE_ID=$MACHINE_ID set via environment" else [ -n "$MACHINE_ID" ] && log_verbose "MACHINE_ID=$MACHINE_ID set via install.conf" fi if [ -n "$_BOOT_ROOT_SAVED" ]; then BOOT_ROOT="$_BOOT_ROOT_SAVED" log_verbose "BOOT_ROOT=$BOOT_ROOT set via environment" else [ -n "$BOOT_ROOT" ] && log_verbose "BOOT_ROOT=$BOOT_ROOT set via install.conf" fi # If /etc/machine-id is initialized we'll use it, otherwise we'll use a freshly # generated one. If the user configured an explicit machine ID to use in # /etc/machine-info to use for our purpose, we'll use that instead (for # compatibility). # shellcheck source=/dev/null if [ -z "$MACHINE_ID" ] && [ -f /etc/machine-info ]; then . /etc/machine-info MACHINE_ID="$KERNEL_INSTALL_MACHINE_ID" [ -n "$MACHINE_ID" ] && \ log_verbose "machine-id $MACHINE_ID acquired from /etc/machine-info" fi if [ -z "$MACHINE_ID" ] && [ -s /etc/machine-id ]; then read -r MACHINE_ID </etc/machine-id || : if [ "$MACHINE_ID" = "uninitialized" ]; then unset MACHINE_ID elif [ ${#MACHINE_ID} -ne 32 ]; then echo "Error: invalid machine-id $MACHINE_ID read from /etc/machine-id" >&2 exit 1 fi [ -n "$MACHINE_ID" ] && \ log_verbose "machine-id $MACHINE_ID acquired from /etc/machine-id" fi if [ -z "$MACHINE_ID" ]; then MACHINE_ID="$(systemd-id128 new)" || exit 1 log_verbose "new machine-id $MACHINE_ID generated" fi # Now that we determined the machine ID to use, let's determine the "token" for # the boot loader entry to generate. We use that for naming the directory below # $BOOT where we want to place the kernel/initrd and related resources, as well # for naming the .conf boot loader spec entry. Typically this is just the # machine ID, but it can be anything else, too, if we are told so. ENTRY_TOKEN_FILE="${KERNEL_INSTALL_CONF_ROOT:-/etc/kernel}/entry-token" if [ -z "$ENTRY_TOKEN" ] && [ -f "$ENTRY_TOKEN_FILE" ]; then read -r ENTRY_TOKEN <"$ENTRY_TOKEN_FILE" log_verbose "entry-token \"$ENTRY_TOKEN\" acquired from $ENTRY_TOKEN_FILE" fi if [ -z "$ENTRY_TOKEN" ]; then # If not configured explicitly, then use a few candidates: the machine ID, # the IMAGE_ID= and ID= fields from /etc/os-release and finally the fixed # string "Default" ENTRY_TOKEN_SEARCH="$MACHINE_ID" # shellcheck source=/dev/null [ -f /etc/os-release ] && . /etc/os-release [ -n "$IMAGE_ID" ] && ENTRY_TOKEN_SEARCH="$ENTRY_TOKEN_SEARCH $IMAGE_ID" [ -n "$ID" ] && ENTRY_TOKEN_SEARCH="$ENTRY_TOKEN_SEARCH $ID" ENTRY_TOKEN_SEARCH="$ENTRY_TOKEN_SEARCH Default" else ENTRY_TOKEN_SEARCH="$ENTRY_TOKEN" fi log_verbose "Entry-token candidates: $ENTRY_TOKEN_SEARCH" # NB: The $MACHINE_ID is guaranteed to be a valid machine ID, but # $ENTRY_TOKEN can be any string that fits into a VFAT filename, though # typically is just the machine ID. if [ -n "$BOOT_ROOT" ]; then # If this was already configured, don't try to guess BOOT_ROOT_SEARCH="$BOOT_ROOT" else BOOT_ROOT_SEARCH="/efi /boot /boot/efi" fi for pref in $BOOT_ROOT_SEARCH; do for suff in $ENTRY_TOKEN_SEARCH; do if [ -d "$pref/$suff" ]; then [ -z "$BOOT_ROOT" ] && BOOT_ROOT="$pref" [ -z "$ENTRY_TOKEN" ] && ENTRY_TOKEN="$suff" log_verbose "$pref/$suff exists, using BOOT_ROOT=$BOOT_ROOT, ENTRY_TOKEN=$ENTRY_TOKEN" break 2 else [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && echo "$pref/$suff not found…" fi if [ -d "$pref/loader/entries" ]; then [ -z "$BOOT_ROOT" ] && BOOT_ROOT="$pref" log_verbose "$pref/loader/entries exists, using BOOT_ROOT=$BOOT_ROOT" break 2 else log_verbose "$pref/loader/entries not found…" fi done done [ -z "$BOOT_ROOT" ] && for pref in "/efi" "/boot/efi"; do if mountpoint -q "$pref"; then BOOT_ROOT="$pref" log_verbose "$pref is a mount point, using BOOT_ROOT=$BOOT_ROOT" break else log_verbose "$pref is not a mount point…" fi done if [ -z "$BOOT_ROOT" ]; then BOOT_ROOT="/boot" [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && \ echo "KERNEL_INSTALL_BOOT_ROOT autodection yielded no candidates, using \"$BOOT_ROOT\"" fi if [ -z "$ENTRY_TOKEN" ]; then ENTRY_TOKEN="$MACHINE_ID" [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && \ echo "No entry-token candidate matched, using \"$ENTRY_TOKEN\" from machine-id" fi export KERNEL_INSTALL_IMAGE_TYPE="" if [ -f "$1" ]; then KERNEL_INSTALL_IMAGE_TYPE="$(bootctl kernel-identify "$1" 2>/dev/null || echo "unknown")" fi if [ "$layout" = "auto" ] || [ -z "$layout" ]; then # No layout configured by the administrator. Let's try to figure it out # automatically from metadata already contained in $BOOT_ROOT. if [ "$KERNEL_INSTALL_IMAGE_TYPE" = "uki" ]; then layout="uki" log_verbose "Kernel image is UKI, using layout=$layout" elif [ -e "$BOOT_ROOT/loader/entries.srel" ]; then read -r ENTRIES_SREL <"$BOOT_ROOT/loader/entries.srel" if [ "$ENTRIES_SREL" = "type1" ]; then # The loader/entries.srel file clearly indicates that the installed # boot loader implements the proper standard upstream boot loader # spec for Type #1 entries. Let's default to that, then. layout="bls" else # The loader/entries.srel file indicates some other spec is # implemented and owns the /loader/entries/ directory. Since we # have no idea what that means, let's stay away from it by default. layout="other" fi [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && \ echo "$BOOT_ROOT/loader/entries.srel with '$ENTRIES_SREL' found, using layout=$layout" elif [ -d "$BOOT_ROOT/$ENTRY_TOKEN" ]; then # If the metadata in $BOOT_ROOT doesn't tell us anything, then check if # the entry token directory already exists. If so, let's assume it's # the standard boot loader spec, too. layout="bls" log_verbose "$BOOT_ROOT/$ENTRY_TOKEN exists, using layout=$layout" else # There's no metadata in $BOOT_ROOT, and apparently no entry token # directory installed? Then we really don't know anything. layout="other" log_verbose "Entry-token directory not found, using layout=$layout" fi fi ENTRY_DIR_ABS="$BOOT_ROOT/$ENTRY_TOKEN/$KERNEL_VERSION" log_verbose "Using ENTRY_DIR_ABS=$ENTRY_DIR_ABS" # Provide a directory where to store generated initrds cleanup() { [ -n "$KERNEL_INSTALL_STAGING_AREA" ] && rm -rf "$KERNEL_INSTALL_STAGING_AREA" } trap cleanup EXIT KERNEL_INSTALL_STAGING_AREA="$(mktemp -d -t kernel-install.staging.XXXXXXX)" export KERNEL_INSTALL_MACHINE_ID="$MACHINE_ID" export KERNEL_INSTALL_ENTRY_TOKEN="$ENTRY_TOKEN" export KERNEL_INSTALL_BOOT_ROOT="$BOOT_ROOT" export KERNEL_INSTALL_LAYOUT="$layout" export KERNEL_INSTALL_INITRD_GENERATOR="$initrd_generator" export KERNEL_INSTALL_STAGING_AREA MAKE_ENTRY_DIR_ABS=0 [ "$layout" = "bls" ] || MAKE_ENTRY_DIR_ABS=1 ret=0 if [ -z "$KERNEL_INSTALL_PLUGINS" ]; then KERNEL_INSTALL_PLUGINS="$( dropindirs_sort ".install" \ "/etc/kernel/install.d" \ "/usr/lib/kernel/install.d" )" fi if [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ]; then printf '%s\n' "Plugin files:" for f in $KERNEL_INSTALL_PLUGINS; do printf '%s\n' "$f" done fi case "$COMMAND" in add) if [ $# -lt 1 ]; then echo "Error: command 'add' requires a kernel image" >&2 exit 1 fi if ! [ -f "$1" ]; then echo "Error: kernel image argument $1 not a file" >&2 exit 1 fi if [ "$MAKE_ENTRY_DIR_ABS" -eq 0 ]; then # Compatibility with earlier versions that used the presence of $BOOT_ROOT/$ENTRY_TOKEN # to signal to 00-entry-directory to create $ENTRY_DIR_ABS # to serve as the indication to use or to not use the BLS if [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ]; then echo "+mkdir -v -p $ENTRY_DIR_ABS" mkdir -v -p "$ENTRY_DIR_ABS" || exit 1 else mkdir -p "$ENTRY_DIR_ABS" || exit 1 fi fi for f in $KERNEL_INSTALL_PLUGINS; do log_verbose "+$f add $KERNEL_VERSION $ENTRY_DIR_ABS" "$@" err=0 "$f" add "$KERNEL_VERSION" "$ENTRY_DIR_ABS" "$@" || err=$? [ $err -eq $skip_remaining ] && break [ $err -ne 0 ] && exit $err done ;; remove) if [ "$1" = "--entry-type" ]; then shift if [ "$1" = "type1" ] || [ "$1" = "type2" ]; then export KERNEL_INSTALL_BOOT_ENTRY_TYPE="$1" elif [ "$1" != "all" ]; then echo "Error: invalid --entry-type '$1'" >&2 exit 1 fi fi for f in $KERNEL_INSTALL_PLUGINS; do log_verbose "+$f remove $KERNEL_VERSION $ENTRY_DIR_ABS" err=0 "$f" remove "$KERNEL_VERSION" "$ENTRY_DIR_ABS" || err=$? [ $err -eq $skip_remaining ] && break [ $err -ne 0 ] && exit $err done if [ "$MAKE_ENTRY_DIR_ABS" -eq 0 ]; then log_verbose "Removing $ENTRY_DIR_ABS/" rm -rf "$ENTRY_DIR_ABS" fi ;; inspect) echo "KERNEL_INSTALL_MACHINE_ID: $KERNEL_INSTALL_MACHINE_ID" echo "KERNEL_INSTALL_ENTRY_TOKEN: $KERNEL_INSTALL_ENTRY_TOKEN" echo "KERNEL_INSTALL_BOOT_ROOT: $KERNEL_INSTALL_BOOT_ROOT" echo "KERNEL_INSTALL_LAYOUT: $KERNEL_INSTALL_LAYOUT" echo "KERNEL_INSTALL_INITRD_GENERATOR: $KERNEL_INSTALL_INITRD_GENERATOR" echo "ENTRY_DIR_ABS: $KERNEL_INSTALL_BOOT_ROOT/$ENTRY_TOKEN/\$KERNEL_VERSION" # Assert that ENTRY_DIR_ABS actually matches what we are printing here [ "${ENTRY_DIR_ABS%/*}" = "$KERNEL_INSTALL_BOOT_ROOT/$ENTRY_TOKEN" ] || { echo "Assertion didn't pass." >&2; exit 1; } ;; *) echo "Error: unknown command '$COMMAND'" >&2 exit 1 ;; esac exit "$ret"
Save