aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKit <2726-kit@users.gitlab.alpinelinux.org>2020-05-27 02:32:24 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2020-05-29 10:02:33 +0000
commit299a1c1afb07fab3c57f60a3545e60492a9c496b (patch)
treedd11cdf09eea8d81442dc82d8fcf4731fa3e35a1
parentd924c05aa4f8e643279bee47ba55d1d04b6a1097 (diff)
downloadaports-299a1c1afb07fab3c57f60a3545e60492a9c496b.tar.gz
aports-299a1c1afb07fab3c57f60a3545e60492a9c496b.tar.bz2
aports-299a1c1afb07fab3c57f60a3545e60492a9c496b.tar.xz
main/openrc: fix parsing quoted kernel options in firstboot
Quoted kernel options in /proc/cmdline look like this: modules=something "ssh_key=ssh-rsa foobar user@foo" quiet Without the eval this would be parsed as: opt='modules=something' opt='"ssh_key=ssh-rsa' opt='foobar' opt='user@foo"' opt='quiet' With the eval in this branch the options are parsed correctly. Since ssh keys need spaces and therefor must be quoted, passing ssh_key by kernel option cannot work as currently implemented. fixes #9504
-rw-r--r--main/openrc/APKBUILD4
-rw-r--r--main/openrc/firstboot.initd3
2 files changed, 4 insertions, 3 deletions
diff --git a/main/openrc/APKBUILD b/main/openrc/APKBUILD
index 7a14dd5878..41aa574c62 100644
--- a/main/openrc/APKBUILD
+++ b/main/openrc/APKBUILD
@@ -2,7 +2,7 @@
pkgname=openrc
pkgver=0.42.1
_ver=${pkgver/_git*/}
-pkgrel=9
+pkgrel=10
pkgdesc="OpenRC manages the services, startup and shutdown of a host"
url="https://github.com/OpenRC/openrc"
arch="all"
@@ -133,5 +133,5 @@ c1615dbeb18e2f988237ecbef830a01fd79970365a799e8704abefab9c716ab45553b3c15f1e3d24
e945859bee6d0ddcfe1897df3af22b80ac1f5a93308bb8dd7b2dafe145bdb16d25b2a9ec627a7b5e8d7a6f458403fcacd914c981c4a38b736c8ffa258a5bfd6b networking.initd
80e43ded522e2d48b876131c7c9997debd43f3790e0985801a8c1dd60bc6e09f625b35a127bf225eb45a65eec7808a50d1c08a5e8abceafc61726211e061e0a2 modloop.confd
d76c75c58e6f4b0801edac4e081b725ef3d50a9a8c9bbb5692bf4d0f804af7d383bf71a73d5d03ed348a89741ef0b2427eb6a7cbf5a9b9ff60a240639fa6ec88 sysfsconf.initd
-f65b061b4272463071022e88a7392d5573f2d95f91e42c8b4f3ef69171604460ddd3d426dfbab382f73a3fac68d4b4ff3a923fdc49fb6fd9f27ebd3ab24e0d0e firstboot.initd
+3371527b2c67cacbb68db54fcb4322e8b7cc7edfd83c648a56156865f1d0d671b91e310de82b1f33ab3ca6136922d2466d1f3632bd3111323e7f3975fce79a88 firstboot.initd
2d5f9f6d41b7c0a8643cfdee1ce3c399bfe4ebff54421f33ab1e74c1c4c1b96a49e54b5cd69f0339a060342e4e5a11067bbff68c39fa487919259d73e8e46ed1 sysctl.initd"
diff --git a/main/openrc/firstboot.initd b/main/openrc/firstboot.initd
index 27f2c1f374..9376905959 100644
--- a/main/openrc/firstboot.initd
+++ b/main/openrc/firstboot.initd
@@ -4,7 +4,8 @@
# read kernel options
init_KOPT() {
- for opt in $(cat /proc/cmdline 2>/dev/null); do
+ eval "set -- $(cat /proc/cmdline 2>/dev/null)"
+ for opt; do
case "$opt" in
ssh_*=*)
eval "KOPT_${opt%%=*}='${opt#*=}'" ;;