[openwrt/openwrt] base-files: allow to skip unwanted scripts
LEDE Commits
lede-commits at lists.infradead.org
Thu Nov 20 08:48:22 PST 2025
robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/9b7ffed9ebbc539fca1c67f8022dc1d5a5ddd55f
commit 9b7ffed9ebbc539fca1c67f8022dc1d5a5ddd55f
Author: Konstantin Demin <rockdrilla at gmail.com>
AuthorDate: Thu Sep 4 15:36:56 2025 +0300
base-files: allow to skip unwanted scripts
this change allows one to selectively "hush" scripts from /etc/profile.d/ directory.
e.g., to skip "opkg to apk cheatsheet" message ("/etc/profile.d/apk-cheatsheet.sh") create empty file "/etc/profile.d/apk-cheatsheet.hush" using, for example, command "touch /etc/profile.d/apk-cheatsheet.hush"
Signed-off-by: Konstantin Demin <rockdrilla at gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19953
Signed-off-by: Robert Marko <robimarko at gmail.com>
---
package/base-files/files/etc/profile | 1 +
1 file changed, 1 insertion(+)
diff --git a/package/base-files/files/etc/profile b/package/base-files/files/etc/profile
index 9ce59c87e9..5c51cc4234 100644
--- a/package/base-files/files/etc/profile
+++ b/package/base-files/files/etc/profile
@@ -32,6 +32,7 @@ esac
if [ -z "$FAILSAFE" ] ; then
for FILE in /etc/profile.d/*.sh ; do
+ [ -f "${FILE%.sh}.hush" ] && continue
[ -f "$FILE" ] && . "$FILE"
done
unset FILE
More information about the lede-commits
mailing list