Skip to content

Commit 9b7ffed

Browse files
rockdrillarobimarko
authored andcommitted
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 <[email protected]> Link: openwrt/openwrt#19953 Signed-off-by: Robert Marko <[email protected]>
1 parent eb71d10 commit 9b7ffed

File tree

1 file changed

+1
-0
lines changed
  • package/base-files/files/etc

1 file changed

+1
-0
lines changed

package/base-files/files/etc/profile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ esac
3232

3333
if [ -z "$FAILSAFE" ] ; then
3434
for FILE in /etc/profile.d/*.sh ; do
35+
[ -f "${FILE%.sh}.hush" ] && continue
3536
[ -f "$FILE" ] && . "$FILE"
3637
done
3738
unset FILE

0 commit comments

Comments
 (0)