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
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
c71ff2a3
Commit
c71ff2a3
authored
Oct 18, 2018
by
Michael Shigorin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tar2fs: handle single boot label as default
No sense to "provide" choice when there's none.
parent
b724c1c2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
tar2fs
bin/tar2fs
+11
-2
No files found.
bin/tar2fs
View file @
c71ff2a3
...
...
@@ -228,6 +228,9 @@ esac
# NB: don't stick BOOTFS here, it has slightly different semantics
pushd
$ROOTFS
/boot
# 4.9.76-elbrus-def-alt1.11.1 -> def
get_label
()
{
echo
"
${
1
# *
}
"
|
sed
-r
's,.*elbrus-([0-9a-z]+)-.*$,\1,'
;
}
KVERSIONS
=
if
[
-s
.origver
]
;
then
while
read
kver
;
do
...
...
@@ -241,16 +244,22 @@ rm -f .origver
# ...target device too
sed
-i
"s,
$LOOPROOT
,
$ROOTDEV
,"
"
$ROOTFS
/etc/fstab"
echo
"** KVERSIONS=[
$KVERSIONS
]"
>
&2
if
[
"
`
echo
$KVERSIONS
|
wc
-w
`
"
=
1
]
;
then
# 2+ labels
echo
-e
"default=
`
get_label
$KVERSIONS
`
\n
"
>>
boot.conf
fi
# FIXME: relies on particular (current) kernel package naming scheme
for
v
in
$KVERSIONS
;
do
l
=
"
$(
echo
"
$v
"
|
sed
-r
's,.*elbrus-([0-9a-z]+)-.*$,\1,'
)
"
l
=
"
`
get_label
"
$v
"
`
"
cat
>>
boot.conf
<<
EOF
label=
$l
partition=0
image=/image-
$v
initrd=/initrd-
$v
.img
cmdline=console=ttyS0,115200 console=tty0 consoleblank=0 hardreset root=UUID=
$ROOTUUID
EOF
done
...
...
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