]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
kernel-install: Skip execution if $KERNEL_INSTALL_BYPASS=1
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 21 Apr 2022 12:47:23 +0000 (14:47 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 22 Apr 2022 00:12:08 +0000 (09:12 +0900)
docs/ENVIRONMENT.md
src/kernel-install/kernel-install.in

index 5f02f888a5ed3a8f61d4b981ecca5a4a82c0c490..257874d95c080487a8587b4bff97feb3e82c8584 100644 (file)
@@ -441,3 +441,10 @@ SYSTEMD_HOME_DEBUG_SUFFIX=foo \
   use for LUKS home directories, overriding the built-in default mount
   options. There's one variable for each of the supported file systems for the
   LUKS home directory backend.
+
+`kernel-install`:
+
+* `$KERNEL_INSTALL_BYPASS` – If set to "1", execution of kernel-install is skipped
+  when kernel-install is invoked. This can be useful if kernel-install is invoked
+  unconditionally as a child process by another tool, such as package managers
+  running kernel-install in a postinstall script.
index f6d262f5226bc40d17d502ca504b86767d3f948a..293ed044d1688ec4fcba595afeadbc78364aa835 100755 (executable)
@@ -67,6 +67,11 @@ for i; do
     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