SHA256
1
0
forked from pool/cloud-init
cloud-init/cloud-init-setpath-dsitentify.patch
Robert Schweikert 0edc4d2a0e - Re-add generator (bsc#1089824, boo#1093501)
+ Add cloud-init-setpath-dsitentify.patch, upstream solution to
    hanle PATH issue
  + Re-enable th egenerator to reduce effort in cloud-init configuration

OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=113
2018-05-22 19:44:33 +00:00

28 lines
715 B
Diff

--- tools/ds-identify.orig
+++ tools/ds-identify
@@ -186,6 +186,16 @@ block_dev_with_label() {
return 0
}
+ensure_sane_path() {
+ local t
+ for t in /sbin /usr/sbin /bin /usr/bin; do
+ case ":$PATH:" in
+ *:$t:*|*:$t/:*) continue;;
+ esac
+ PATH="${PATH:+${PATH}:}$t"
+ done
+}
+
read_fs_info() {
cached "${DI_BLKID_OUTPUT}" && return 0
# do not rely on links in /dev/disk which might not be present yet.
@@ -1420,6 +1430,7 @@ _main() {
main() {
local ret=""
+ ensure_sane_path
[ -d "$PATH_RUN_CI" ] || mkdir -p "$PATH_RUN_CI"
if [ "${1:+$1}" != "--force" ] && [ -f "$PATH_RUN_CI_CFG" ] &&
[ -f "$PATH_RUN_DI_RESULT" ]; then