From ec5b59eb776354555939d2af65d0b66bab095f40 Mon Sep 17 00:00:00 2001 From: Stefan Hansson Date: Sun, 28 Jan 2024 19:26:51 +0100 Subject: [PATCH] CI: check for "before wpa_supplicant" in OpenRC service files (MR 4769) See https://gitlab.com/postmarketOS/pmaports/-/merge_requests/4564 --- .ci/grep.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.ci/grep.sh b/.ci/grep.sh index e34b97e01..59519139a 100755 --- a/.ci/grep.sh +++ b/.ci/grep.sh @@ -72,4 +72,12 @@ if grep -qr $POSTMARKETOS_WALLPAPER_PATH \ exit_code=1 fi +OPENRC_SERVICE_FILES=$(find . -name '*.initd') +# shellcheck disable=SC2086 +if grep -q 'before wpa_supplicant' $OPENRC_SERVICE_FILES; then + echo "ERROR: Please use 'before wlan' in OpenRC service files! This ensures compatibility with both wpa_supplicant and iwd." + grep --color=always 'before wpa_supplicant' $OPENRC_SERVICE_FILES + exit_code=1 +fi + exit "$exit_code"