Message ID | 1434088452-12666-1-git-send-email-hendrik@linux-nerds.de |
---|---|
State | Superseded |
Headers | show |
Am 2015-06-12 07:54, schrieb Hendrik Lüth: > OpenWrt should support an optinal /etc/profile.d directory like most > other Linux > distributions. This allows packages to install their own scripts into > /etc/profile.d/. This is the second version, which includes suggestions > from > the mailing-list. > --- > package/base-files/files/etc/profile | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/package/base-files/files/etc/profile > b/package/base-files/files/etc/profile > index 3dd58e1..d7129c3 100644 > --- a/package/base-files/files/etc/profile > +++ b/package/base-files/files/etc/profile > @@ -14,3 +14,13 @@ export PS1='\u@\h:\w\$ ' > > [ -x /usr/bin/arp ] || arp() { cat /proc/net/arp; } > [ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 $*; } > + > +[ -z "$FAILSAFE" ] && { > + if [ -d /etc/profile.d ]; then > + for i in /etc/profile.d/*.sh ; do > + if [ -r $i ]; then > + . $i > + fi > + done > + fi > +} Good Morning, i just wanted to ask for your oppinions on the second verison of my patch. regards, Hendrik
* Hendrik <hendrik@linux-nerds.de> [15.06.2015 09:02]: > i just wanted to ask for your oppinions on the second verison of my > patch. why didnt you pay attention for all the suggestions? bye, bastian
Am 2015-06-15 09:17, schrieb Bastian Bittorf: > * Hendrik <hendrik@linux-nerds.de> [15.06.2015 09:02]: >> i just wanted to ask for your oppinions on the second verison of my >> patch. > > why didnt you pay attention for all the suggestions? bye, bastian After the discussion on the list this was what I thought was the state of the discussion: - don't run /etc/profile.d/* in failsafe ( i added this) - only execute shell-scripts (added this also) What else is there i forgot? regards, Hendrik
diff --git a/package/base-files/files/etc/profile b/package/base-files/files/etc/profile index 3dd58e1..d7129c3 100644 --- a/package/base-files/files/etc/profile +++ b/package/base-files/files/etc/profile @@ -14,3 +14,13 @@ export PS1='\u@\h:\w\$ ' [ -x /usr/bin/arp ] || arp() { cat /proc/net/arp; } [ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 $*; } + +[ -z "$FAILSAFE" ] && { + if [ -d /etc/profile.d ]; then + for i in /etc/profile.d/*.sh ; do + if [ -r $i ]; then + . $i + fi + done + fi +}