代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/dracut 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 9d267e664c6f95a7b940c5706643b055623a39d7 Mon Sep 17 00:00:00 2001
From: Anakin Zhang <benjamin93@163.com>
Date: Thu, 2 Jul 2020 14:46:51 +0800
Subject: [PATCH] add option to include file metadata in initramfs
Signed-off-by: Anakin Zhang <benjamin93@163.com>
---
dracut.sh | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/dracut.sh b/dracut.sh
index 60ac46f..bab91ca 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -246,6 +246,9 @@ Creates initial ramdisk images for preloading modules
--kernel-image [FILE] location of the kernel image
--regenerate-all Regenerate all initramfs images at the default location
for the kernel versions found on the system
+ -e, --file-metadata [TYPE]
+ Include file metadata in the initramfs. Specify "xattr"
+ to include file extended attributes.
--version Display version
If [LIST] has multiple arguments, then you have to put these in quotes.
@@ -341,7 +344,7 @@ rearrange_params() {
TEMP=$(
unset POSIXLY_CORRECT
getopt \
- -o "a:m:o:d:I:k:c:r:L:fvqlHhMN" \
+ -o "a:m:o:d:I:k:c:r:L:fvqlHhMNe:" \
--long kver: \
--long add: \
--long force-add: \
@@ -432,6 +435,7 @@ rearrange_params() {
--long hostonly-i18n \
--long hostonly-nics: \
--long no-machineid \
+ --long file-metadata: \
--long version \
-- "$@"
)
@@ -800,6 +804,8 @@ while :; do
--no-machineid)
machine_id_l="no"
;;
+ -e|--file-metadata)
+ file_metadata_l="$2"; PARMS_TO_STORE+=" '$2'"; shift;;
--version)
long_version
exit 1
@@ -998,6 +1004,7 @@ stdloglvl=$((stdloglvl + verbosity_mod_l))
[[ $uefi_splash_image_l ]] && uefi_splash_image="$uefi_splash_image_l"
[[ $kernel_image_l ]] && kernel_image="$kernel_image_l"
[[ $machine_id_l ]] && machine_id="$machine_id_l"
+[[ $file_metadata_l ]] && file_metadata_opt="-e $file_metadata_l"
if ! [[ $outfile ]]; then
if [[ $machine_id != "no" ]]; then
@@ -2324,7 +2331,7 @@ if [[ $create_early_cpio == yes ]]; then
cd "$early_cpio_dir/d"
find . -print0 | sort -z \
| cpio ${CPIO_REPRODUCIBLE:+--reproducible} --null \
- ${cpio_owner:+-R "$cpio_owner"} -H newc -o --quiet > "${DRACUT_TMPDIR}/initramfs.img"
+ ${cpio_owner:+-R "$cpio_owner"} -H newc $file_metadata_opt -o --quiet > "${DRACUT_TMPDIR}/initramfs.img"
); then
dfatal "dracut: creation of $outfile failed"
exit 1
@@ -2382,7 +2389,7 @@ if ! (
umask 077
cd "$initdir"
find . -print0 | sort -z \
- | cpio ${CPIO_REPRODUCIBLE:+--reproducible} --null ${cpio_owner:+-R "$cpio_owner"} -H newc -o --quiet \
+ | cpio ${CPIO_REPRODUCIBLE:+--reproducible} --null ${cpio_owner:+-R "$cpio_owner"} -H newc $file_metadata_opt -o --quiet \
| $compress >> "${DRACUT_TMPDIR}/initramfs.img"
); then
dfatal "dracut: creation of $outfile failed"
--
1.8.3.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。