aports/community/cloud-init/03-hook-hotplug-sh.patch
Dermot Bradley a6edc4f2a3 community/cloud-init: upgrade to 21.4
Upgrade to cloud-init 21.4.
Remove 02-hosts-template-fix.patch which was accepted upstream.
Rename some existing patches.
Add 06-ssh-fp-debug.patch.
2021-11-06 02:42:05 +00:00

38 lines
1.0 KiB
Diff

From: Dermot Bradley <dermot_bradley@yahoo.com>
Date: Thu, 22 July 2021 00:49 +0100
Subject: [PATCH] cloud-init: Rewrite hook-hotplug to not be Bash-specific
Rewrite shellscript to not be Bash-specific
---
diff -aur a/tools/hook-hotplug b/tools/hook-hotplug
--- a/tools/hook-hotplug
+++ b/tools/hook-hotplug
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# This file is part of cloud-init. See LICENSE file for license information.
# This script checks if cloud-init has hotplug hooked and if
@@ -11,12 +11,12 @@
if is_finished; then
# open cloud-init's hotplug-hook fifo rw
exec 3<>/run/cloud-init/hook-hotplug-cmd
- env_params=(
- --subsystem="${SUBSYSTEM}"
- handle
- --devpath="${DEVPATH}"
- --udevaction="${ACTION}"
- )
+ env_params=" \
+ --subsystem=\"${SUBSYSTEM}\" \
+ handle \
+ --devpath=\"${DEVPATH}\" \
+ --udevaction=\"${ACTION}\" \
+ "
# write params to cloud-init's hotplug-hook fifo
- echo "${env_params[@]}" >&3
+ echo "${env_params}" >&3
fi