mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-01-18 23:22:24 +01:00
Upgrade to 21.3 release. Add tzdata dependancy, remove e2fsprogs-extra dependancy. Add logrotate configuration file. Add cloud-init-hotplugd init.d script and simple daemon for new network hotplug functionality in this release. Remove some more unnecessary (doc) files from package. Update README.Alpine to add known issue (and solution) for SSH access with locked user accounts, and to detail how to use hotplug functionality.
45 lines
1.2 KiB
Diff
45 lines
1.2 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
|
|
@@ -9,18 +9,18 @@
|
|
}
|
|
|
|
hotplug_enabled() {
|
|
- [ "$(cloud-init devel hotplug-hook -s "${SUBSYSTEM}" query)" == "enabled" ]
|
|
+ [ "$(cloud-init devel hotplug-hook -s "${SUBSYSTEM}" query)" = "enabled" ]
|
|
}
|
|
|
|
if is_finished && hotplug_enabled; 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
|