Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mkimage-profiles
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Жора Змейкин
mkimage-profiles
Commits
d52d90c0
Verified
Commit
d52d90c0
authored
Jul 15, 2026
by
Жора Змейкин
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
live-install: preserve BASE_BOOTARGS in installed system
Signed-off-by:
Жора Змейкин
<
katze@etersoft.ru
>
parent
210ded5b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
0 deletions
+49
-0
11-base-bootargs
...res.in/live-install/live/image-scripts.d/11-base-bootargs
+49
-0
No files found.
features.in/live-install/live/image-scripts.d/11-base-bootargs
0 → 100755
View file @
d52d90c0
#!/bin/sh -efu
# BASE_BOOTARGS are profile-provided arguments for installed systems.
# install2 does not consume them directly, so store the materialized profile
# value and add a preinstall hook that updates the target GRUB configuration.
[
-n
"
${
GLOBAL_BASE_BOOTARGS
-
}
"
]
||
exit
0
hookdir
=
"/usr/share/install2/preinstall.d"
args_file
=
"/usr/share/install2/base-bootargs"
hook
=
"
$hookdir
/72-base-bootargs"
install
-d
"
$hookdir
"
printf
'%s\n'
"
$GLOBAL_BASE_BOOTARGS
"
>
"
$args_file
"
cat
>
"
$hook
"
<<
'
EOF
'
#!/bin/sh -efu
. install2-init-functions
args_file="@BASE_BOOTARGS_FILE@"
grubcfg="
$destdir
"/etc/sysconfig/grub2
[ -s "
$args_file
" ] || exit 0
[ -f "
$grubcfg
" ] || exit 0
base_bootargs="
$(
cat
"
$args_file
"
)
"
[ -n "
$base_bootargs
" ] || exit 0
current_bootargs="
$(
sed
-n
\
"s/^GRUB_CMDLINE_LINUX_DEFAULT='
\\
(.*
\\
)'
$/
\\
1/p"
\
"
$grubcfg
"
)
"
missing_bootargs=
for arg in
$base_bootargs
; do
case "
$current_bootargs$missing_bootargs
" in
*"
$arg
"*) ;;
*) missing_bootargs="
$missing_bootargs
$arg
" ;;
esac
done
[ -n "
$missing_bootargs
" ] || exit 0
subst "s|^GRUB_CMDLINE_LINUX_DEFAULT='|&
$missing_bootargs
|" "
$grubcfg
" ||:
:
EOF
sed
-i
"s|@BASE_BOOTARGS_FILE@|
$args_file
|"
"
$hook
"
chmod
+x
"
$hook
"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment