Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
alpine
alpine-conf
Commits
2d0489a9
Commit
2d0489a9
authored
Oct 24, 2014
by
Kaarle Ritvanen
Browse files
update-kernel: silently skip non-existent packages
parent
12c69966
Changes
1
Hide whitespace changes
Inline
Side-by-side
update-kernel.in
View file @
2d0489a9
...
...
@@ -57,19 +57,31 @@ apk add -qU -t $VIRTUAL mkinitfs squashfs-tools
.
/etc/mkinitfs/mkinitfs.conf
ARCH
=
$(
apk
--print-arch
)
FLAVOR
=
$(
uname
-r
|
cut
-d
-
-f
3-
)
TMPDIR
=
$(
mktemp
-dt
$SCRIPT
.XXXXXX
)
ROOT
=
$TMPDIR
/root
_apk
()
{
apk add
-q
-p
"
$ROOT
"
--no-scripts
--arch
$ARCH
--keys-dir
/etc/apk/keys
\
local
cmd
=
$1
shift
apk
$cmd
-p
"
$ROOT
"
--keys-dir
/etc/apk/keys
\
--repositories-file
/etc/apk/repositories
$*
}
_apk
-U
--initdb
alpine-base linux-
$FLAVOR
linux-firmware
_apk dahdi-linux dahdi-linux-
$FLAVOR
||
:
_apk xtables-addons-
$FLAVOR
||
:
add_pkgs
()
{
_apk add
-q
--no-scripts
$*
}
extra_pkgs
()
{
local
res
=
$(
_apk search
-x
$1
)
if
[
"
$res
"
]
;
then
add_pkgs
$*
fi
}
add_pkgs
-U
--initdb
alpine-base linux-
$FLAVOR
linux-firmware
extra_pkgs dahdi-linux-
$FLAVOR
dahdi-linux
extra_pkgs xtables-addons-
$FLAVOR
KVER
=
$(
ls
"
$ROOT
/lib/modules"
)
...
...
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