public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] emacs r1172 - emacs-daemon
@ 2008-12-07 10:44 Ulrich Mueller (ulm)
  0 siblings, 0 replies; only message in thread
From: Ulrich Mueller (ulm) @ 2008-12-07 10:44 UTC (permalink / raw
  To: gentoo-commits

Author: ulm
Date: 2008-12-07 10:44:54 +0000 (Sun, 07 Dec 2008)
New Revision: 1172

Modified:
   emacs-daemon/ChangeLog
   emacs-daemon/emacs-wrapper.sh
   emacs-daemon/emacs.rc
Log:
Determine SHELL from password file if unset.

Modified: emacs-daemon/ChangeLog
===================================================================
--- emacs-daemon/ChangeLog	2008-12-07 01:38:52 UTC (rev 1171)
+++ emacs-daemon/ChangeLog	2008-12-07 10:44:54 UTC (rev 1172)
@@ -1,3 +1,7 @@
+2008-12-07  Ulrich Mueller  <ulm@gentoo.org>
+
+	* emacs.rc (start): Determine SHELL from password file if unset.
+
 2008-12-05  Ulrich Mueller  <ulm@gentoo.org>
 
 	* emacs-wrapper.sh: Add a timeout and kill Emacs if the daemon

Modified: emacs-daemon/emacs-wrapper.sh
===================================================================
--- emacs-daemon/emacs-wrapper.sh	2008-12-07 01:38:52 UTC (rev 1171)
+++ emacs-daemon/emacs-wrapper.sh	2008-12-07 10:44:54 UTC (rev 1172)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-# Start Emacs with a login shell wrapper to read the user's profile.
+# Start Emacs with a login shell wrapper to read the user's profile
 export SHELL=${SHELL:-/bin/bash}
 exec -l "${SHELL}" -c "exec \"${EMACS}\" $*" </dev/null &>/dev/null &
 pid=$!

Modified: emacs-daemon/emacs.rc
===================================================================
--- emacs-daemon/emacs.rc	2008-12-07 01:38:52 UTC (rev 1171)
+++ emacs-daemon/emacs.rc	2008-12-07 10:44:54 UTC (rev 1172)
@@ -44,6 +44,10 @@
     ebegin "Starting Emacs daemon for ${USER}"
     eval home="~${USER}"
 
+    if [ -z "${SHELL}" ]; then
+	SHELL=$(awk -F: "\$1 == \"${USER}\" { print \$7 }" /etc/passwd)
+    fi
+
     start-stop-daemon --start \
 	--user "${USER}" --chdir "${home}" --pidfile "${PIDFILE}" \
 	--env EMACS="${EMACS}" --env EMACS_TIMEOUT="${EMACS_TIMEOUT}" \




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-12-07 10:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-07 10:44 [gentoo-commits] emacs r1172 - emacs-daemon Ulrich Mueller (ulm)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox