aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2016-11-09 20:56:30 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2016-11-09 21:19:21 +0000
commit1c846b9437d1653230c66794ce89a5a79c410b40 (patch)
tree2205ef8a8ef9cf2b9943d98f784460e07ccb5157
parentd4f2c7028722b705a423527450f8f7c11658041a (diff)
downloadalpine-conf-1c846b9437d1653230c66794ce89a5a79c410b40.tar.bz2
alpine-conf-1c846b9437d1653230c66794ce89a5a79c410b40.tar.xz
update-kernel: add support for -k/--apk-pubkey
This is a way to inject the users pubkey to initramfs
-rw-r--r--update-kernel.in12
1 files changed, 10 insertions, 2 deletions
diff --git a/update-kernel.in b/update-kernel.in
index 981156c..eccb7b5 100644
--- a/update-kernel.in
+++ b/update-kernel.in
@@ -56,8 +56,8 @@ usage() {
}
QUIET_OPT="--quiet"
-OPTS=$(getopt -l arch:,build-dir:,flavor:,feature:,help,package:,verbose,hostkeys,media,repositories-file: \
- -n $SCRIPT -o a:b:f:F:hp:vKM -- "$@") || usage 1
+OPTS=$(getopt -l arch:,build-dir:,flavor:,feature:,help,package:,verbose,apk-pubkey:,hostkeys,media,repositories-file: \
+ -n $SCRIPT -o a:b:f:F:hp:vk:KM -- "$@") || usage 1
eval set -- "$OPTS"
while :; do
@@ -89,6 +89,10 @@ while :; do
-v|--verbose)
QUIET_OPT=
;;
+ -k|--apk-pubkey)
+ shift
+ APK_PUBKEY="$1"
+ ;;
-K|--hostkeys)
MKINITFS_ARGS="$MKINITFS_ARGS -K"
;;
@@ -230,6 +234,10 @@ else
fi
_apk add --no-scripts alpine-base $PACKAGES
+if [ -n "$APK_PUBKEY" ]; then
+ mkdir -p "$ROOT"/etc/apk/keys
+ cp "$APK_PUBKEY" "$ROOT"/etc/apk/keys/
+fi
KVER_FLAVOR=
[ "$FLAVOR" = vanilla ] || KVER_FLAVOR=-$FLAVOR