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
17
Issues
17
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
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
5d6ce5a2
Commit
5d6ce5a2
authored
Oct 24, 2014
by
Kaarle Ritvanen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update-kernel: destination directory argument
parent
12a01f73
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
18 deletions
+28
-18
update-kernel.in
update-kernel.in
+28
-18
No files found.
update-kernel.in
View file @
5d6ce5a2
...
@@ -14,17 +14,23 @@ SIGNALS="HUP INT TERM"
...
@@ -14,17 +14,23 @@ SIGNALS="HUP INT TERM"
SCRIPT
=
update-kernel
SCRIPT
=
update-kernel
VIRTUAL
=
.tmp-
$SCRIPT
VIRTUAL
=
.tmp-
$SCRIPT
while
read
MOUNT
;
do
DESTDIR
=
$1
MNTDIR
=
if
[
-z
"
$DESTDIR
"
]
;
then
while
read
MOUNT
;
do
set
--
$MOUNT
set
--
$MOUNT
[
$2
=
/.modloop
]
||
continue
[
$2
=
/.modloop
]
||
continue
DESTDIR
=
$(
dirname
$(
losetup
$1
|
cut
-d
" "
-f
3
))
DESTDIR
=
$(
dirname
$(
losetup
$1
|
cut
-d
" "
-f
3
))
MNTDIR
=
$(
dirname
$DESTDIR
)
MNTDIR
=
$(
dirname
$DESTDIR
)
break
break
done
< /proc/mounts
done
< /proc/mounts
if
[
-z
"
$MNTDIR
"
]
;
then
if
[
-z
"
$MNTDIR
"
]
;
then
echo
"Module loopback device not mounted"
>
&2
echo
"Module loopback device not mounted"
>
&2
exit
1
exit
1
fi
fi
fi
remount
()
{
remount
()
{
...
@@ -83,14 +89,18 @@ mkinitfs -q -F "$features squashfs" -b $ROOT -o $STAGING/$FLAVOR.gz $KVER
...
@@ -83,14 +89,18 @@ mkinitfs -q -F "$features squashfs" -b $ROOT -o $STAGING/$FLAVOR.gz $KVER
cp
$ROOT
/boot/vmlinuz-
$FLAVOR
$STAGING
/
$FLAVOR
cp
$ROOT
/boot/vmlinuz-
$FLAVOR
$STAGING
/
$FLAVOR
ignore_sigs
if
[
"
$MNTDIR
"
]
;
then
remount
-w
ignore_sigs
remount
-w
rm
-f
"
$DESTDIR
/
$MODIMG
"
fi
rm
-f
$DESTDIR
/
$MODIMG
mv
$STAGING
/
*
"
$DESTDIR
"
mv
$STAGING
/
*
$DESTDIR
set
+e
if
[
"
$MNTDIR
"
]
;
then
sync
set
+e
remount
-r
sync
remount
-r
fi
exit
0
exit
0
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