shinit: Add package 10205/head
authorJeffery To <jeffery.to@gmail.com>
Sat, 5 Oct 2019 21:48:25 +0000 (05:48 +0800)
committerJeffery To <jeffery.to@gmail.com>
Fri, 11 Oct 2019 20:39:31 +0000 (04:39 +0800)
commit2685ba269f8fa75cd3dd96f37b88ef3972beddbb
treed13284ee7fce518dc6f8f0bc91564e351ce8ddb9
parentc6f2699f9645e8a2dfff62f585aa2afdd0837a78
shinit: Add package

This package adds support for /etc/shinit and ~/.shinit files, which
contain commands to be run at the start of all interactive shells.
(/etc/profile and ~/.profile are read for login shells only.)

This is useful for those who regularly open non-login, interactive
shells, for example users of GNU Screen or tmux.

(This is based on a patch[1] I submitted for OpenWrt master, but there
does not appear to be much interest in merging the change.)

(This package uses the ENV shell variable, of which the POSIX standard
has a brief description[2]. The dash manpage[3] also describes how the
ENV variable is handled. (dash is the basis for busybox ash.))

[1]: https://patchwork.ozlabs.org/patch/1094493/
[2]: https://pubs.opengroup.org/onlinepubs/9699919799//utilities/V3_chap02.html#tag_18_05_03
[3]: https://manpages.debian.org/buster/dash/dash.1.en.html#Invocation

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
(cherry picked from c04dff7965ed84bc57ea957ecad81fb902b7f146)
utils/shinit/Makefile [new file with mode: 0644]
utils/shinit/files/etc/profile.d/shinit.sh [new file with mode: 0644]
utils/shinit/files/etc/shinit [new file with mode: 0644]