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
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
Ximper Linux
mkimage-profiles
Commits
1babd587
Commit
1babd587
authored
Aug 27, 2020
by
Anton Midyukov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
grub: Added the ability to define the default menu item
Example: @$(call set,GRUB_DEFAULT,uefi-firmware) @$(call xport,GRUB_DEFAULT) See features.in/grub/cfg.in/*.cfg
parent
346e3c21
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
01-grub
features.in/grub/stage1/scripts.d/01-grub
+10
-0
No files found.
features.in/grub/stage1/scripts.d/01-grub
View file @
1babd587
...
...
@@ -40,6 +40,16 @@ fi
# there should be DEFAULT directive there (at least for alterator-netinst)
default_change
()
{
local
CFG
=
$1
if
[
-n
"
$GLOBAL_GRUB_DEFAULT
"
]
;
then
if
[
-n
"
$(
grep
-i
"
$GLOBAL_GRUB_DEFAULT
"
"
$CFG
"
)
"
]
;
then
DEFAULT
=
"
$GLOBAL_GRUB_DEFAULT
"
sed
-i
'/^default/d'
echo
"default=
$DEFAULT
"
>>
"
$CFG
"
else
echo
"error:
$GLOBAL_GRUB_DEFAULT
missing in
$CFG
"
>
&2
exit
1
fi
fi
if
!
grep
-i
'^default'
"
$CFG
"
;
then
DEFAULT
=
"
$(
grep
-i
'\-\-id '
"
$CFG
"
|
head
-1
| rev|
cut
-f2
-d
' '
|rev
)
"
if
[
-n
"
$DEFAULT
"
]
;
then
...
...
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