Commit 3cce7bd8 authored by Brian Cameron's avatar Brian Cameron Committed by Brian Cameron

Now use gdmflexiserver to get the PidFile instead of grepping the config

2006-02-07  Brian Cameron  <brian.cameron@sun.com>

        * gdm-restart.in, gdm-safe-restart.in, gdm-stop.in, gdm.spec.in:
          Now use gdmflexiserver to get the PidFile instead of grepping the
          config file directly since this is a safer/better way to get
          configuration date.
parent 55230e85
2006-02-07 Brian Cameron <brian.cameron@sun.com>
* gdm-restart.in, gdm-safe-restart.in, gdm-stop.in, gdm.spec.in:
Now use gdmflexiserver to get the PidFile instead of grepping the
config file directly since this is a safer/better way to get
configuration date.
2006-02-07 Brian Cameron <brian.cameron@sun.com>
This patch resolves some performance issues that I noticed when
......
#!/bin/sh
PIDFILE=`grep '^PidFile=' @EXPANDED_SYSCONFDIR@/gdm/gdm.conf | sed -e 's/^PidFile=//'`
PIDFILE=`gdmflexiserver --command="GET_CONFIG daemon/PidFile"`
CHECKPIDFILE=`echo $PIDFILE | sed 's/^\([^ ]*\) .*$/\1/'`
if [ "x$CHECKPIDFILE" = "xOK" ]; then
PIDFILE=`echo $PIDFILE | sed 's/^.* \(.*\)$/\1/'`
else
PIDFILE=""
fi
if test x$PIDFILE = x ; then
echo "Can't find the PID file in the configuration file, going to try:"
echo "/var/run/gdm.pid"
......
#!/bin/sh
PIDFILE=`grep '^PidFile=' @EXPANDED_SYSCONFDIR@/gdm/gdm.conf | sed -e 's/^PidFile=//'`
PIDFILE=`gdmflexiserver --command="GET_CONFIG daemon/PidFile"`
CHECKPIDFILE=`echo $PIDFILE | sed 's/^\([^ ]*\) .*$/\1/'`
if [ "x$CHECKPIDFILE" = "xOK" ]; then
PIDFILE=`echo $PIDFILE | sed 's/^.* \(.*\)$/\1/'`
else
PIDFILE=""
fi
if test x$PIDFILE = x ; then
echo "Can't find the PID file in the configuration file, going to try:"
echo "/var/run/gdm.pid"
......
#!/bin/sh
PIDFILE=`grep '^PidFile=' @EXPANDED_SYSCONFDIR@/gdm/gdm.conf | sed -e 's/^PidFile=//'`
PIDFILE=`gdmflexiserver --command="GET_CONFIG daemon/PidFile"`
CHECKPIDFILE=`echo $PIDFILE | sed 's/^\([^ ]*\) .*$/\1/'`
if [ "x$CHECKPIDFILE" = "xOK" ]; then
PIDFILE=`echo $PIDFILE | sed 's/^.* \(.*\)$/\1/'`
else
PIDFILE=""
fi
if test x$PIDFILE = x ; then
echo "Can't find the PID file in the configuration file, going to try:"
echo "/var/run/gdm.pid"
......
......@@ -86,7 +86,15 @@ if test x$FIFOFILE = x ; then
else
FIFOFILE="$FIFOFILE"/.gdmfifo
fi
PIDFILE=`grep '^PidFile=' %{sysconfdir}/X11/gdm/gdm.conf | sed -e 's/^PidFile=//'`
PIDFILE=`gdmflexiserver --command="GET_CONFIG daemon/PidFile"`
CHECKPIDFILE=`echo $PIDFILE | sed 's/^\([^ ]*\) .*$/\1/'`
if [ "x$CHECKPIDFILE" = "xOK" ]; then
PIDFILE=`echo $PIDFILE | sed 's/^.* \(.*\)$/\1/'`
else
PIDFILE=""
fi
if test x$PIDFILE = x ; then
PIDFILE=/var/run/gdm.pid
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment