diff options
author | Philippe Schommers <philippe@schommers.be> | 2019-11-30 14:49:02 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2021-01-06 16:19:16 +0000 |
commit | 49faa51a096145e4ec59005eb3b8bcb7f15df5b8 (patch) | |
tree | 851f73945cddaf0458b4416ab4077f050c384d23 /update-kernel.in | |
parent | 830b3bdeea8867c3db0e41c07325ce3544d15232 (diff) | |
download | alpine-conf-49faa51a096145e4ec59005eb3b8bcb7f15df5b8.zip |
update-kernel: Add option to override keys dir
Diffstat (limited to 'update-kernel.in')
-rw-r--r-- | update-kernel.in | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/update-kernel.in b/update-kernel.in index 6efb3cb..00b1384 100644 --- a/update-kernel.in +++ b/update-kernel.in @@ -28,6 +28,7 @@ MNTDIR= PACKAGES= MKINITFS_ARGS= REPOSITORIES_FILE=/etc/apk/repositories +KEYS_DIR=/etc/apk/keys SIGNALS="HUP INT TERM" TMPDIR= features= @@ -59,6 +60,7 @@ usage() { -K|--hostkeys Include host keys in initramfs -C|--compression Initramfs compression (see mkinitfs for options) -M|--media Boot media directory layout + -d|--keys-dir Override directory of trusted keys for apk --repositories-file <f> apk repositories file __EOF__ @@ -66,8 +68,8 @@ usage() { } QUIET_OPT="--quiet" -OPTS=$(getopt -l arch:,build-dir:,flavor:,feature:,modloopfw:,help,package:,modloopsign,verbose,apk-pubkey:,hostkeys,compression:,media,repositories-file: \ - -n $SCRIPT -o a:b:f:F:hp:svk:KC:M -- "$@") || usage 1 +OPTS=$(getopt -l arch:,build-dir:,flavor:,feature:,modloopfw:,help,package:,modloopsign,verbose,apk-pubkey:,hostkeys,compression:,media,repositories-file:,keys-dir: \ + -n $SCRIPT -o a:b:f:F:hp:svk:KC:Md: -- "$@") || usage 1 eval set -- "$OPTS" while :; do @@ -120,6 +122,9 @@ while :; do -M|--media) MEDIA=yes ;; + -d|--keys-dir) + KEYS_DIR="$1" + ;; --repositories-file) shift REPOSITORIES_FILE=$1 @@ -222,7 +227,7 @@ _apk() { shift apk $cmd $QUIET_OPT -p $ROOT --arch "$ARCH" \ - --keys-dir /etc/apk/keys \ + --keys-dir $KEYS_DIR \ --repositories-file "$REPOSITORIES_FILE" $* } |