Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
metadata-collect-agent
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
metadata-collect-agent
Commits
479194ea
Commit
479194ea
authored
Sep 30, 2020
by
Leo Le Bouter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debian.package: BootOrder is modified automatically on new entry
parent
d1d018e5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
debian.package/uefi-boot-metadata-collect-agent/DEBIAN/postinst
....package/uefi-boot-metadata-collect-agent/DEBIAN/postinst
+4
-4
No files found.
debian.package/uefi-boot-metadata-collect-agent/DEBIAN/postinst
View file @
479194ea
...
@@ -5,10 +5,10 @@ ROOT_DEV=$(mount | grep -Po '^.+(?= on / )')
...
@@ -5,10 +5,10 @@ ROOT_DEV=$(mount | grep -Po '^.+(?= on / )')
if
!
efibootmgr
--disk
"
$EFI_DEV
"
--verbose
|
grep
"uefi-boot-metadata-collect-agent.efi"
;
then
if
!
efibootmgr
--disk
"
$EFI_DEV
"
--verbose
|
grep
"uefi-boot-metadata-collect-agent.efi"
;
then
efibootmgr
--create
--disk
"
$EFI_DEV
"
--label
'UEFI metadata-collect-agent'
--loader
/uefi-boot-metadata-collect-agent.efi
efibootmgr
--create
--disk
"
$EFI_DEV
"
--label
'UEFI metadata-collect-agent'
--loader
/uefi-boot-metadata-collect-agent.efi
BOOT_CUR
=
$(
efibootmgr |
grep
-Po
'(?<=BootCurrent: ).+'
)
#
BOOT_CUR=$(efibootmgr | grep -Po '(?<=BootCurrent: ).+')
BOOT_AGENT
=
$(
efibootmgr |
grep
-Po
'(?<=Boot)\d+(?=.+UEFI metadata-collect-agent)'
)
#
BOOT_AGENT=$(efibootmgr | grep -Po '(?<=Boot)\d+(?=.+UEFI metadata-collect-agent)')
NEW_BOOT_ORDER
=
$(
efibootmgr |
grep
-Po
'(?<=BootOrder: ).+'
|
sed
"s/
$BOOT_CUR
/
$BOOT_AGENT
,
$BOOT_CUR
/"
)
#
NEW_BOOT_ORDER=$(efibootmgr | grep -Po '(?<=BootOrder: ).+' | sed "s/$BOOT_CUR/$BOOT_AGENT,$BOOT_CUR/")
efibootmgr
-o
"
$NEW_BOOT_ORDER
"
#
efibootmgr -o "$NEW_BOOT_ORDER"
fi
fi
e2label
"
$ROOT_DEV
"
"ROOT"
||
true
e2label
"
$ROOT_DEV
"
"ROOT"
||
true
...
...
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