commit:     4886b6c523a4b37c60de76b7486abe08eeb727c1
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 14 22:14:54 2025 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Fri Mar 14 22:14:54 2025 +0000
URL:        https://gitweb.gentoo.org/proj/emacs-tools.git/commit/?id=4886b6c5

Fix ownership of pidfile dir

* emacs.rc (start_pre): New function, replaces checkconfig.
Fix checkpath call; the directory should belong to the superuser.
(start): Remove call to checkconfig.

Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 ChangeLog | 6 ++++++
 emacs.rc  | 6 ++----
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 326467b..3f10ef1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2025-03-14  Ulrich Müller  <[email protected]>
+
+       * emacs.rc (start_pre): New function, replaces checkconfig.
+       Fix checkpath call; the directory should belong to the superuser.
+       (start): Remove call to checkconfig.
+
 2025-03-09  Ulrich Müller  <[email protected]>
 
        * Version 0.24 released.

diff --git a/emacs.rc b/emacs.rc
index 8302aa8..3f8611f 100644
--- a/emacs.rc
+++ b/emacs.rc
@@ -18,7 +18,7 @@ depend() {
     after bootmisc dbus
 }
 
-checkconfig() {
+start_pre() {
     if [ "${USER}" = "${RC_SVCNAME}" ]; then
         eerror "You have to create an init script for each user:"
         eerror "ln -s emacs /etc/init.d/emacs.<user>"
@@ -42,13 +42,11 @@ checkconfig() {
     fi
 
     checkpath -d --owner 0 --mode 0755 "${PIDFILE_DIR%/*}"
-    checkpath -d --owner "${USER}" --mode 0755 "${PIDFILE_DIR}"
+    checkpath -d --owner 0 --mode 0755 "${PIDFILE_DIR}"
 }
 
 start() {
     local home
-    checkconfig || return 1
-
     eval home="~${USER}"
 
     SHELL=${EMACS_SHELL:-$(awk -F: "\$1 == \"${USER}\" { print \$7 }" \

Reply via email to