[OpenWrt-Devel] [PATCH] base-files: add /etc/profile.d support
br1 at einfach.org
Wed Jun 10 17:56:08 EDT 2015
On 06/10/2015 07:46 PM, Bastian Bittorf wrote:
> * Yousong Zhou <yszhou4tech at gmail.com> [10.06.2015 20:38]:
>>> distributions. This allows packages to install their own scripts into
>> IMO, OpenWrt is not like most of other Linux distributions. So what are
>> those other packages that need this and the current specific use cases?
> I agree, that OpenWrt differs - and i have a usecase:
> we like to have special helpers like
> alias n='wget -qO - http://127.0.0.1:2006/neighbours'
> (for OLSRd)
> and we source/include a special 'metascript' which
> makes adminstration much easier. for now we patch /etc/profile
> but having it in profile.d is more clean and: it is automatically
> removed if package XY is also removed...
Also something more simple: I'd like to have ll='ls -la' on my systems
and OpenWRT based "mini-distributions". Right now I have to change
package/base-files/etc/profile or override /etc/profile completely from
the files/ folder. In this case it's not too complicated, but its not
maintainable very well.
Another maybe more interesting example is the Java VM "jamvm". It
depends on "classpath" which is quite big and one of my systems has to
be installed on the SD card. Because the libraries are on /mnt/sd/ I
need "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/mnt/sd/usr/lib/classpath"
for jamvm to work properly. That could go into a "system" and
"distribution" specific package which puts it into /etc/profile.d/...
which is much cleaner than overriding /etc/profile or -worse- messing
with /etc/profile in a postinst script...
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
More information about the openwrt-devel