From 68d93351ef40b729ca285b8de94a6b316e761ad8 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 21 Sep 2008 17:36:54 +0200 Subject: [PATCH] First load the bash file for this hostname, then rc.local. This change is the bash part of 2f24b0aebdd38599256c21b82ee7b39fe5ad0963. --- bash/rc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bash/rc b/bash/rc index e0563a9..3874363 100644 --- a/bash/rc +++ b/bash/rc @@ -10,11 +10,11 @@ export EDITOR='vim' set -o vi -# If a rc.local file exists load it, otherwise load a rc file for the current -# hostname (first part before a dot) if it exists. +# If a rc file for the current hostname (first part before a dot) exists load +# it, otherwise load rc.local if available. host=$(echo $(hostname) | sed -e 's/\..*$//') -if [ -f ~/.bash/rc.local ]; then - source ~/.bash/rc.local -elif [ -f ~/.bash/rc.$host ]; then +if [ -f ~/.bash/rc.$host ]; then source ~/.bash/rc.$host +elif [ -f ~/.bash/rc.local ]; then + source ~/.bash/rc.local fi -- 2.44.2