Tiny Core Base > TCB Q&A Forum

/etc/profile.d

(1/1)

danielibarnes:
What about adding an /etc/profile.d feature? Right now, there is not a simple means for an extension to insert a script into the login process. In a typical linux distribution, I like to put

export JAVA_HOME=/usr/local/java

into a script placed in /etc/profile.d. This is cleaner than modifying /etc/profile (which one should avoid). It is simple to modify /etc/profile to add this feature:

for i in /etc/profile.d/*.sh ; do
    if [ -r "$i" ]; then
        . $i
    fi
done

but I imagine others would find it useful so I am suggesting it as a feature for the base. FWIW, it is mentioned in the LSB.

roberts:
Sounds good.

Navigation

[0] Message Index

Go to full version