aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2009-03-18 07:22:17 +0000
committerUlrich Müller <ulm@gentoo.org>2009-03-18 07:22:17 +0000
commit46378cbdb222ad7237a45a25a4d24bbc713af49c (patch)
treea6674f873072c09cc812e6f01e9c577ed054bc2e
parentRename emacs-desktop to emacs-common-gentoo since it will be more general. (diff)
downloademacs-tools-46378cbdb222ad7237a45a25a4d24bbc713af49c.tar.gz
emacs-tools-46378cbdb222ad7237a45a25a4d24bbc713af49c.tar.bz2
emacs-tools-46378cbdb222ad7237a45a25a4d24bbc713af49c.zip
Rename SHELL to EMACS_SHELL.
svn path=/emacs-daemon/; revision=1239
-rw-r--r--ChangeLog7
-rw-r--r--emacs.conf2
-rw-r--r--emacs.rc8
3 files changed, 11 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 1a3fdd7..5723550 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-03-18 Ulrich Mueller <ulm@gentoo.org>
+
+ * emacs.rc (start): Initialise SHELL variable from EMACS_SHELL;
+ use information from the passwd file as fallback.
+ (EMACS_SHELL): Default to bash.
+ * emacs.conf (EMACS_SHELL): Renamed from SHELL.
+
2009-03-03 Ulrich Mueller <ulm@gentoo.org>
* 10emacs-daemon-gentoo.el: Remove backwards compatibility code.
diff --git a/emacs.conf b/emacs.conf
index 39dbc16..2225a30 100644
--- a/emacs.conf
+++ b/emacs.conf
@@ -24,4 +24,4 @@
# The SHELL variable to be passed to EMACS_START. emacs-wrapper.sh uses
# this as the user's login shell. If (explicitely set to) empty, then
# the shell field from the passwd file is used.
-#SHELL="/bin/bash"
+#EMACS_SHELL="/bin/bash"
diff --git a/emacs.rc b/emacs.rc
index 23b2b52..4471fd8 100644
--- a/emacs.rc
+++ b/emacs.rc
@@ -5,6 +5,7 @@
: ${EMACS:=/usr/bin/emacs}
: ${EMACS_OPTS:=--daemon}
+: ${EMACS_SHELL=/bin/bash}
: ${EMACS_START:=/usr/libexec/emacs/emacs-wrapper.sh}
: ${EMACS_TIMEOUT:=30}
USER=${RC_SVCNAME#*.}
@@ -30,8 +31,6 @@ checkconfig() {
return 1
fi
- # Executing Emacs here also ensures a warm cache, which later helps
- # to create the pid file in a timely manner (within 0.5 seconds).
local has_daemon=$(${EMACS} -batch -q --no-site-file \
--eval "(princ (fboundp 'daemonp))")
if [ "${has_daemon}" != t ]; then
@@ -49,9 +48,8 @@ start() {
eval home="~${USER}"
- if [ -z "${SHELL}" ]; then
- SHELL=$(awk -F: "\$1 == \"${USER}\" { print \$7 }" /etc/passwd)
- fi
+ SHELL=${EMACS_SHELL:-$(awk -F: "\$1 == \"${USER}\" { print \$7 }" \
+ /etc/passwd)}
export SHELL
ebegin "Starting Emacs daemon for user ${USER}"