dist: using "tk_private=1" to judge private release

Users may use kernel parameters which described in
Documentation/admin-guide/kernel-parameters.txt, to decouple from the
existing kernel parameters, add and use "tk_private=1" to judge private
release.

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
Reviewed-by: Yongliang Gao <leonylgao@tencent.com>
This commit is contained in:
Jianping Liu 2024-05-27 10:56:55 +08:00
parent 88ab9d92ee
commit 38f4fdb968
1 changed files with 2 additions and 4 deletions

View File

@ -1223,11 +1223,9 @@ fi
### Module package
%pre modules
# In TS private release, kernel command line will add "module.sig_enforce=1" and
# "module_blacklist=usb-storage".
# In TS private release, kernel command line in /etc/default/grub will add "tk_private=1".
# When install TS private release, do not need install "usb-storage nouveau cfg80211" into initramfs.
{ grep -q "module.sig_enforce=1" /etc/default/grub 2>/dev/null && \
grep -q "usb-storage" /etc/default/grub 2>/dev/null ; } && \
grep -q "tk_private=1" /etc/default/grub 2>/dev/null && \
echo "omit_dracutmodules+=\" usb-storage nouveau cfg80211 \"" >> /etc/dracut.conf
%post modules