public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] /etc/profile.d/
@ 2005-07-15 21:59 Herbert Fischer
  2005-07-15 22:11 ` Mike Frysinger
  2005-07-16  5:46 ` Petteri Räty
  0 siblings, 2 replies; 40+ messages in thread
From: Herbert Fischer @ 2005-07-15 21:59 UTC (permalink / raw
  To: gentoo-dev

Hi,

I'm new to this list and I really don't know if this is the right
place to post this message. I already posted something about this on
the gentoo forums and I don't know too if the correct persons are
seeing that, so I decided to post here. Sorry for the double posting,
so I'll be straight on the fact.

In about one and a half year working with Gentoo I had a lots os
yeepies and some boring problems.

I love the /etc/env.d, env-update, /etc/profile.env thing but I think
that is something missing.

In the past I worked many years with Slackware. Now I replaced
Slackware with Gentoo and everywere I use Gentoo, even on some old
creepy IBM-PPC B50 hardware.

In Slackware I had /etc/profile.d/ as a place to customize all my
shell environment, including aliases, prompt, etc, without touching
original Slackware's files.

In Gentoo we need to "hack" files that sometimes are changed in some
"emerge world" updates, like /etc/profile, /etc/skel/.bashrc, and that
is a little mess to me, as when etc-update's list is too long I place
a "-5" (auto update) and voilá... all my customizations are gone.

I suggest Gentoo adopting a /etc/profile.d/ dir like Slackware, or
even better, have some way, some place, to customize aliases, prompts,
etc, without being replaced on "etc-update"s... some place untouchable
for Gentoo, by Gentoo and that's automatically parsed on /etc/profile
(or somewhere else) by default.

Slackware parses /etc/profile.d/ by having those lines bellow on /etc/profile:

# Append any additional sh scripts found in /etc/profile.d/:
for file in /etc/profile.d/*.sh ; do
  if [ -x $file ]; then
    . $file
  fi
done

... and those lines in /etc/csh.login (for csh users):

# Append any additional csh scripts found in /etc/profile.d/:
[ -d /etc/profile.d ]
if ($status == 0) then
        set nonomatch
        foreach file ( /etc/profile.d/*.csh )
                [ -x $file ]
                if ($status == 0) then
                        source $file
                endif
        end
        unset file nonomatch
endif

That way the root user only need to create new files on
/etc/profile.d/ to customize their shells. *.sh for bash/ash/sh and
*.csh for csh/tcsh shells.

Best regards,

Herbert G. Fischer

-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 40+ messages in thread

end of thread, other threads:[~2005-07-20 23:29 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-15 21:59 [gentoo-dev] /etc/profile.d/ Herbert Fischer
2005-07-15 22:11 ` Mike Frysinger
2005-07-15 22:36   ` Herbert Fischer
2005-07-15 22:41     ` Mike Frysinger
2005-07-15 22:56       ` Herbert Fischer
2005-07-15 23:02         ` Mike Frysinger
2005-07-15 23:40           ` Herbert Fischer
2005-07-16  1:25           ` Michael Marineau
2005-07-16  1:34             ` Mike Frysinger
2005-07-16  1:56               ` Michael Marineau
2005-07-16  2:03                 ` Mike Frysinger
2005-07-16  3:03                 ` Donnie Berkholz
2005-07-16 17:03               ` Marius Mauch
2005-07-16 17:37                 ` Herbert Fischer
2005-07-16 18:08                   ` Herbert Fischer
2005-07-16 18:24                     ` Herbert Fischer
2005-07-17  0:21                     ` Mike Frysinger
2005-07-16 20:58                 ` Martin Schlemmer
2005-07-17  0:23                   ` Mike Frysinger
2005-07-17  0:22                 ` Mike Frysinger
2005-07-17  2:38                   ` Marius Mauch
2005-07-17  2:48                     ` Mike Frysinger
2005-07-18  6:53                       ` Donnie Berkholz
2005-07-18 13:00                         ` Mike Frysinger
2005-07-18 23:47                           ` Donnie Berkholz
2005-07-19  0:00                             ` Mike Frysinger
2005-07-19  0:10                               ` Donnie Berkholz
2005-07-20 19:27                                 ` Herbert Fischer
2005-07-20 21:05                                   ` Mike Frysinger
2005-07-20 22:46                                     ` Herbert Fischer
2005-07-20 22:52                                       ` Mike Frysinger
2005-07-20 23:26                                         ` Herbert Fischer
2005-07-16 16:51             ` Herbert Fischer
2005-07-16  3:16           ` Aaron Walker
2005-07-17  0:24             ` Mike Frysinger
2005-07-17  1:13               ` Herbert Fischer
2005-07-17  1:18                 ` Mike Frysinger
2005-07-17 11:35                 ` [gentoo-dev] /etc/profile.d/ Duncan
2005-07-16 10:40           ` [gentoo-dev] /etc/profile.d/ Martin Schlemmer
2005-07-16  5:46 ` Petteri Räty

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox