[24400] in Source-Commits
/svn/athena r23995 - trunk/debathena/config/shell-config/debian
daemon@ATHENA.MIT.EDU (Geoffrey Thomas)
Mon Sep 7 23:36:45 2009
Date: Mon, 7 Sep 2009 23:36:32 -0400
From: Geoffrey Thomas <geofft@MIT.EDU>
Message-Id: <200909080336.n883aWD7030626@drugstore.mit.edu>
To: source-commits@mit.edu
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Author: geofft
Date: 2009-09-07 23:36:32 -0400 (Mon, 07 Sep 2009)
New Revision: 23995
Added:
trunk/debathena/config/shell-config/debian/01-debathena-shell-init
trunk/debathena/config/shell-config/debian/01-set-athena-user
trunk/debathena/config/shell-config/debian/csh-set-athena-user
Removed:
trunk/debathena/config/shell-config/debian/bashrc.debathena
Modified:
trunk/debathena/config/shell-config/debian/bash.bashrc.debathena
trunk/debathena/config/shell-config/debian/changelog
trunk/debathena/config/shell-config/debian/cshrc.debathena
trunk/debathena/config/shell-config/debian/debathena-bash-config.install
trunk/debathena/config/shell-config/debian/debathena-tcsh-config.install
trunk/debathena/config/shell-config/debian/profile.debathena
Log:
In shell-config:
* Don't set environment variables in
/etc/{bash.bashrc,csh.cshrc}.debathena (Trac #214)
Copied: trunk/debathena/config/shell-config/debian/01-debathena-shell-init (from rev 23994, trunk/debathena/config/shell-config/debian/bashrc.debathena)
===================================================================
--- trunk/debathena/config/shell-config/debian/bashrc.debathena 2009-09-07 22:30:58 UTC (rev 23994)
+++ trunk/debathena/config/shell-config/debian/01-debathena-shell-init 2009-09-08 03:36:32 UTC (rev 23995)
@@ -0,0 +1,24 @@
+#!/bin/bash
+# Global bashrc file for Debathena machines
+
+export HOSTTYPE="`/bin/machtype`"
+export ATHENA_SYS=`/bin/machtype -S`
+export ATHENA_SYS_COMPAT=`/bin/machtype -C`
+if [ -z "$ATHENA_SYS" ]; then
+ export ATHENA_SYS=@sys
+fi
+
+renew () {
+ principal=`klist -5 2>/dev/null | sed -n 's/^Default principal: // p'`
+ kinit -54 "${principal:-$ATHENA_USER}" || return $?
+ [ -e /afs/athena.mit.edu ] && aklog || {
+ ret=$?
+ echo >&2
+ echo "Your AFS client does not seem to be working. To troubleshoot this problem," >&2
+ echo "visit http://debathena.mit.edu/troubleshooting#openafs-modules" >&2
+ return $ret
+ }
+}
+
+add_flags=
+add () { eval "$( /bin/attach -Padd -b $add_flags "$@" )" ; }
Added: trunk/debathena/config/shell-config/debian/01-set-athena-user
===================================================================
--- trunk/debathena/config/shell-config/debian/01-set-athena-user 2009-09-07 22:30:58 UTC (rev 23994)
+++ trunk/debathena/config/shell-config/debian/01-set-athena-user 2009-09-08 03:36:32 UTC (rev 23995)
@@ -0,0 +1,3 @@
+# If your Athena username differs from your local username,
+# you should override this in your own .profile
+export ATHENA_USER=$USER
Modified: trunk/debathena/config/shell-config/debian/bash.bashrc.debathena
===================================================================
--- trunk/debathena/config/shell-config/debian/bash.bashrc.debathena 2009-09-07 22:30:58 UTC (rev 23994)
+++ trunk/debathena/config/shell-config/debian/bash.bashrc.debathena 2009-09-08 03:36:32 UTC (rev 23995)
@@ -1,13 +1,10 @@
# This is the Debathena /etc/bash.bashrc configuration.
# It is only necessary if you are not using debathena-login.
-# It sources a bash script that creates the add and renew commands,
-# sets ATHENA_SYS is set correctly, and other similar tasks.
+# It sources all bash scripts in the directory bashrc.d
# To remove this feature, uninstall the debathena-bash-config package.
-DEBATHENA_BASHRC=/usr/share/debathena-bash-config/bashrc.debathena
-if [ -e "$DEBATHENA_BASHRC" ]; then
- . "$DEBATHENA_BASHRC"
-fi
+DEBATHENA_BASHRC_DIR=/usr/share/debathena-bash-config/bashrc.d/
+for i in `run-parts --list "$DEBATHENA_BASHRC_DIR"`; do source "$i"; done
# Now source the normal bash.bashrc (afterwards, to allow overrides)
. /etc/bash.bashrc.debathena-orig
Deleted: trunk/debathena/config/shell-config/debian/bashrc.debathena
Modified: trunk/debathena/config/shell-config/debian/changelog
===================================================================
--- trunk/debathena/config/shell-config/debian/changelog 2009-09-07 22:30:58 UTC (rev 23994)
+++ trunk/debathena/config/shell-config/debian/changelog 2009-09-08 03:36:32 UTC (rev 23995)
@@ -1,3 +1,10 @@
+debathena-shell-config (1.11) unstable; urgency=low
+
+ * Don't set environment variables in
+ /etc/{bash.bashrc,csh.cshrc}.debathena (Trac #214)
+
+ -- Jessica Hamrick <jhamrick@mit.edu> Mon, 07 Sep 2009 23:21:59 -0400
+
debathena-shell-config (1.10) unstable; urgency=low
* Default ATHENA_USER to USER.
Added: trunk/debathena/config/shell-config/debian/csh-set-athena-user
===================================================================
--- trunk/debathena/config/shell-config/debian/csh-set-athena-user 2009-09-07 22:30:58 UTC (rev 23994)
+++ trunk/debathena/config/shell-config/debian/csh-set-athena-user 2009-09-08 03:36:32 UTC (rev 23995)
@@ -0,0 +1,3 @@
+# If your Athena username differs from your local username,
+# you should override this in your own .login
+setenv ATHENA_USER $USER
Modified: trunk/debathena/config/shell-config/debian/cshrc.debathena
===================================================================
--- trunk/debathena/config/shell-config/debian/cshrc.debathena 2009-09-07 22:30:58 UTC (rev 23994)
+++ trunk/debathena/config/shell-config/debian/cshrc.debathena 2009-09-08 03:36:32 UTC (rev 23995)
@@ -8,10 +8,6 @@
endif
setenv ATHENA_SYS_COMPAT `/bin/machtype -C`
-# If your Athena username differs from your local username,
-# you should override this in your own .cshrc or .cshrc.mine
-setenv ATHENA_USER $USER
-
alias renew 'kinit -54 $ATHENA_USER && aklog'
set add_flags
Modified: trunk/debathena/config/shell-config/debian/debathena-bash-config.install
===================================================================
--- trunk/debathena/config/shell-config/debian/debathena-bash-config.install 2009-09-07 22:30:58 UTC (rev 23994)
+++ trunk/debathena/config/shell-config/debian/debathena-bash-config.install 2009-09-08 03:36:32 UTC (rev 23995)
@@ -1,3 +1,4 @@
debian/bash.bashrc.debathena /etc/
debian/profile.debathena /etc/
-debian/bashrc.debathena /usr/share/debathena-bash-config/
+debian/01-debathena-shell-init /usr/share/debathena-bash-config/bashrc.d/
+debian/01-set-athena-user /usr/share/debathena-bash-config/profile.d/
Modified: trunk/debathena/config/shell-config/debian/debathena-tcsh-config.install
===================================================================
--- trunk/debathena/config/shell-config/debian/debathena-tcsh-config.install 2009-09-07 22:30:58 UTC (rev 23994)
+++ trunk/debathena/config/shell-config/debian/debathena-tcsh-config.install 2009-09-08 03:36:32 UTC (rev 23995)
@@ -1,2 +1,3 @@
debian/csh.cshrc.debathena /etc/
debian/cshrc.debathena /usr/share/debathena-tcsh-config/
+debian/csh-set-athena-user /etc/csh/login.d/
Modified: trunk/debathena/config/shell-config/debian/profile.debathena
===================================================================
--- trunk/debathena/config/shell-config/debian/profile.debathena 2009-09-07 22:30:58 UTC (rev 23994)
+++ trunk/debathena/config/shell-config/debian/profile.debathena 2009-09-08 03:36:32 UTC (rev 23995)
@@ -4,10 +4,8 @@
# It sources a bash script that creates the add and renew commands,
# sets ATHENA_SYS is set correctly, and other similar tasks.
# To remove this feature, uninstall the debathena-bash-config package.
-DEBATHENA_BASHRC=/usr/share/debathena-bash-config/bashrc.debathena
-if [ -e "$DEBATHENA_BASHRC" ]; then
- . "$DEBATHENA_BASHRC"
-fi
+DEBATHENA_PROFILE_DIR=/usr/share/debathena-bash-config/profile.d
+for i in `run-parts --list "$DEBATHENA_PROFILE_DIR"`; do source "$i"; done
# Now source the normal profile (afterwards, to allow overrides)
. /etc/profile.debathena-orig