summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2011-11-11 15:19:25 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2011-11-11 15:19:25 -0500
commita46c5c23b26cf149065bd516a781bc66535d8bcf (patch)
tree1d89b52f2bb31c33420d5ac66b43dd50397a18a1
parentb273cc64b722c2a46befa65ed0e389d60bd83b2e (diff)
move daemon-starting into a separate file, do it in .profile (and .bashrc)
-rw-r--r--.bashrc7
-rw-r--r--.login-daemons7
-rw-r--r--.profile22
3 files changed, 25 insertions, 11 deletions
diff --git a/.bashrc b/.bashrc
index c4e4c64..2c5b611 100644
--- a/.bashrc
+++ b/.bashrc
@@ -96,9 +96,6 @@ if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
-if [ "$TERM" != dumb ]; then
- export TMPDIR="$HOME/tmp"
- daemon emacs --daemon
- daemon sysfiles
- daemon maildirproc
+if [ -f "$HOME/.login-daemons" ]; then
+ . "$HOME/.login-daemons"
fi
diff --git a/.login-daemons b/.login-daemons
new file mode 100644
index 0000000..5b8851e
--- /dev/null
+++ b/.login-daemons
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+if [ -x "`which daemon`"]; then
+ daemon emacs --daemon
+ daemon sysfiles
+ daemon maildirproc
+fi
diff --git a/.profile b/.profile
index 36a3ec5..bc8d481 100644
--- a/.profile
+++ b/.profile
@@ -13,12 +13,10 @@ if [ -d "$HOME/.prefix/bin" ]; then
export PATH="$HOME/.prefix/bin:$PATH"
fi
-# if running bash
-if [ -n "$BASH_VERSION" ]; then
- # include .bashrc if it exists
- if [ -f "$HOME/.bashrc" ]; then
- . "$HOME/.bashrc"
- fi
+if [ -d "$HOME/tmp"]; then
+ export TMPDIR="$HOME/tmp"
+elif [ -d "$HOME/.prefix/tmp"]; then
+ export TMPDIR="$HOME/.prefix/tmp"
fi
# set SELECTED_EDITOR, EDITOR, and VISUAL to set the text editor used
@@ -30,6 +28,18 @@ if [ -f "$HOME/.selected_editor" ]; then
export VISUAL="${VISUAL:-$SELECTED_EDITOR}"
fi
+if [ -f "$HOME/.login-daemons" ]; then
+ . "$HOME/.login-daemons"
+fi
+
+# if running bash
+if [ -n "$BASH_VERSION" ]; then
+ # include .bashrc if it exists
+ if [ -f "$HOME/.bashrc" ]; then
+ . "$HOME/.bashrc"
+ fi
+fi
+
if [ -x "`which alsactl`" ]; then
alsactl --file $HOME/.alsa.save restore &> /dev/null || true
fi