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
92210657
Commit
92210657
authored
May 04, 2012
by
Natanael Copa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setup-bootable: remount as read/write if needed
parent
aa172c5a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
setup-bootable.in
setup-bootable.in
+19
-0
No files found.
setup-bootable.in
View file @
92210657
...
...
@@ -4,10 +4,14 @@ prog=${0##*/}
version
=
@VERSION@
cleanup
()
{
local
i
=
cd
/
if
[
-n
"
$uninstalls
"
]
;
then
apk del
-q
syslinux
fi
for
i
in
$read_only_mounts
;
do
mount
-o
remount,ro
"
$i
"
done
if
[
-n
"
$umounts
"
]
;
then
umount
$umounts
fi
...
...
@@ -50,6 +54,14 @@ vecho() {
echo
"
$@
"
}
# check if given dir is read-only
is_read_only
()
{
local
tmpfile
=
$(
mktemp
-p
"
$1
"
2>/dev/null
)
[
-z
"
$tmpfile
"
]
&&
return
0
rm
-f
"
$tmpfile
"
return
1
}
usage
()
{
cat
<<
__EOF__
$prog
$version
...
...
@@ -123,6 +135,13 @@ elif [ -b "$dest" ]; then
umounts
=
"
$umounts
$destdir
"
fi
# remount as rw if needed
if
is_read_only
"
$destdir
"
;
then
vecho
"Remounting
$destdir
as read/write"
mount
-o
remount,rw
"
$dest
"
||
die
"Failed to remount
$destdir
as rw"
read_only_mounts
=
"
$read_only_mounts
$destdir
"
fi
# fish out label, uuid and type
eval
$(
blkid
$dest
|
cut
-d
:
-f2-
)
...
...
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