[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Directory for bash profile snippets?



Þann 2006-06-15, 07:59:18 (+0200) skrifaði Waldemar la Tendresse:
> On Thu, May 25, 2006 at 04:36:05PM +0200, Michelle Konzack wrote:
> > Why not put the alias in /etc/profile ?
> > 
> > Greetings
> >     Michelle Konzack
> > 
> > 
> I want have aliases set depending on the package presence/absence. So I
> ideally want to make the package available through cfengine/puppet plus
> put an alias file in some foo.d dir.

Do you want to do something like check if a package is installed and
if it is then set some alias, then this should work:

if(dpkg -s pacakgename | grep "Status: install ok installed")
    alias='something'
fi

then just put that into the /etc/profile (I dont know cfengine/puppet
so cant help you with that).

HTH

Oli



Reply to: