From 65507dfe829fdcf940d6fa5704826f00af9a2266 Mon Sep 17 00:00:00 2001
From: wangxiyuan <wangxiyuan1007@gmail.com>
Date: Wed, 22 Mar 2023 03:05:37 +0000
Subject: [PATCH] Fix openeuler mirror problem

Currently, openeuler mirror doesn't work. It raises the error like:
"Ignoring non-executable files: 00-setup-mirror.bash".

This patch make the file executable to fix the mirror config problem.

Change-Id: I39ec958f864c2ff5193ea6d8f85d672437367ca0
---
 .../openeuler-minimal/pre-install.d/00-setup-mirror.bash  | 8 ++++++++
 1 file changed, 8 insertions(+)
 mode change 100644 => 100755 diskimage_builder/elements/openeuler-minimal/pre-install.d/00-setup-mirror.bash

diff --git a/diskimage_builder/elements/openeuler-minimal/pre-install.d/00-setup-mirror.bash b/diskimage_builder/elements/openeuler-minimal/pre-install.d/00-setup-mirror.bash
old mode 100644
new mode 100755
index 312f03452..339c89618
--- a/diskimage_builder/elements/openeuler-minimal/pre-install.d/00-setup-mirror.bash
+++ b/diskimage_builder/elements/openeuler-minimal/pre-install.d/00-setup-mirror.bash
@@ -1,3 +1,11 @@
+#!/bin/bash
+
+if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
+    set -x
+fi
+set -eu
+set -o pipefail
+
 if [ -n "${DIB_DISTRIBUTION_MIRROR:-}" ]; then
     # Only set the mirror for OS, everything, EPOL and update repositories,
     # The others (debuginfo and source) aren't mirrored since they do not exist on all mirrors