From owner-freebsd-questions@FreeBSD.ORG Wed Dec 18 23:03:02 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2AB51DE3 for ; Wed, 18 Dec 2013 23:03:02 +0000 (UTC) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E0C291FE1 for ; Wed, 18 Dec 2013 23:03:00 +0000 (UTC) Received: from r56.edvax.de (port-92-195-127-162.dynamic.qsc.de [92.195.127.162]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx02.qsc.de (Postfix) with ESMTPS id 7D46227873; Thu, 19 Dec 2013 00:02:53 +0100 (CET) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id rBIN2XZ2003477; Thu, 19 Dec 2013 00:02:33 +0100 (CET) (envelope-from freebsd@edvax.de) Date: Thu, 19 Dec 2013 00:02:33 +0100 From: Polytropon To: Graham Allan Subject: Re: System Wide Bash Login Script Message-Id: <20131219000233.95a6e1dd.freebsd@edvax.de> In-Reply-To: <52B1DFAB.8030300@physics.umn.edu> References: <52B1DFAB.8030300@physics.umn.edu> Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Dec 2013 23:03:02 -0000 On Wed, 18 Dec 2013 11:47:23 -0600, Graham Allan wrote: > There's a compile-time option in config-top.h ("#define SYS_BASHRC > ..."), which nobody seems to use. > > [...] I still don't understand why > bash people don't see the value in this feature - having to insert that > snippet into everybody's personal bashrc is just stupid IMO... It sounds wrong, especially when you consult the documentation, "man bash", down at the "FILES" section: /etc/profile The systemwide initialization file, executed for login shells The local file ~/.bashrc, used for interactive shells (that don't have to be login shells) doesn't seem to have a global equivalent. When the shell is a login shell, this should be sufficient. A similar "precedence mechanism" has been a useful thing for the C shell for decades: /etc/csh.cshrc, /etc/csh.login and /etc/csh.logout are being used system-wide, which means that its settings can benefit everyone who has an _empty_ local configuration file; only changes need to be applied locally, if intended, so system settings could be easily "inherited" without requiring changes to users' dotfiles, it was just required to make sure the skel/ subtree did privde them with empty files (that they could change them- selves if they wanted). -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...