diff options
author | Ulrich Müller <ulm@gentoo.org> | 2009-03-18 07:22:17 +0000 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2009-03-18 07:22:17 +0000 |
commit | 46378cbdb222ad7237a45a25a4d24bbc713af49c (patch) | |
tree | a6674f873072c09cc812e6f01e9c577ed054bc2e | |
parent | Rename emacs-desktop to emacs-common-gentoo since it will be more general. (diff) | |
download | emacs-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-- | ChangeLog | 7 | ||||
-rw-r--r-- | emacs.conf | 2 | ||||
-rw-r--r-- | emacs.rc | 8 |
3 files changed, 11 insertions, 6 deletions
@@ -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. @@ -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" @@ -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}" |