Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
alpine-conf
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
18
Issues
18
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
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
alpine
alpine-conf
Commits
192c7317
Commit
192c7317
authored
Sep 30, 2011
by
Natanael Copa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setup-bootable: use force UUID in syslinux.cfg, even for upgraders
The -k option is to not use UUID
parent
b587245f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
setup-bootable.in
setup-bootable.in
+13
-1
No files found.
setup-bootable.in
View file @
192c7317
...
...
@@ -58,6 +58,8 @@ or a device. If DEST is ommitted /media/usb will be used.
Options:
-f Force overwrite existing files. Will overwrite syslinux.cfg if upgrade.
-h Show this help.
-k Keep current alpine_dev in syslinux.cfg. Without this it will be replaced
with the UUID.
-u Upgrade mode. Keep existing syslinux.cfg and don't run syslinux.
If apk cache is detected, attempts to upgrade the apk cache
-s Force run syslinux, even if upgrade mode.
...
...
@@ -67,10 +69,11 @@ __EOF__
exit
1
}
while
getopts
"fhusv"
opt
;
do
while
getopts
"fh
k
usv"
opt
;
do
case
"
$opt
"
in
f
)
force
=
1
;;
h
)
usage
;;
k
)
keep_alpine_dev
=
1
;;
u
)
upgrade
=
1
;;
s
)
syslinux
=
1
;;
v
)
verbose
=
1
;;
...
...
@@ -116,6 +119,9 @@ elif [ -b "$dest" ]; then
umounts
=
"
$umounts
$destdir
"
fi
# fish out label, uuid and type
eval
$(
blkid
$dest
|
cut
-d
:
-f2-
)
# Check for RO mounting
if
[
"
`
grep
\"
$destdir
\"
/proc/mount |
grep
'ro,'
`
"
=
"ro"
]
;
then
remountneeded
=
"Y"
...
...
@@ -218,6 +224,12 @@ for i in $tomove; do
mv
"
$destdir
"
/.new/
$i
"
$destdir
"
/
||
die
"Failed to move
$destdir
/.new/ to
$destdir
"
done
if
[
-z
"
$keep_alpine_dev
"
]
&&
[
-n
"
$UUID
"
]
;
then
sed
-i
-e
"s/alpine_dev=[^
\t
]
\+
/alpine_dev=UUID=
$UUID
/"
\
"
$destdir
"
/syslinux.cfg
fi
# Update the cache folder on destdir if present
if
[
-e
"
$destdir
"
/
*
.apkovl.tar.gz
]
&&
[
-e
"
$destdir
"
/cache
]
;
then
mkdir
"
$destdir
"
/tmp.cache
...
...
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