diff options
author | George Lebl <jirka@5z.com> | 2001-08-29 02:24:44 +0000 |
---|---|---|
committer | George Lebl <jirka@src.gnome.org> | 2001-08-29 02:24:44 +0000 |
commit | b4158dc5d58c2582611a65f58f6f519903951539 (patch) | |
tree | b0306e6022b590e1bb86ce6af170d6e52f76bc8d /gdm.spec.in | |
parent | f26a6041b8180a08ae52fd8f2f1fadd89edaed43 (diff) | |
download | gdm-b4158dc5d58c2582611a65f58f6f519903951539.tar.gz |
redo restart logic to be a lot smarter and not hang on leftover fifo's
Tue Aug 28 19:23:34 2001 George Lebl <jirka@5z.com>
* gdm.spec.in: redo restart logic to be a lot smarter and not hang
on leftover fifo's
Tue Aug 28 17:37:12 2001 George Lebl <jirka@5z.com>
* Release 2.2.4.0
Diffstat (limited to 'gdm.spec.in')
-rw-r--r-- | gdm.spec.in | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/gdm.spec.in b/gdm.spec.in index 3ac68f6e..e23dc9ca 100644 --- a/gdm.spec.in +++ b/gdm.spec.in @@ -78,7 +78,24 @@ exit 0 %post # Attempt to restart GDM softly by use of the fifo. Wont work on older # then 2.2.3.1 versions but should work nicely on later upgrades. -if test -w %{localstatedir}/gdm/.gdmfifo ; then (echo;echo SOFT_RESTART) >> %{localstatedir}/gdm/.gdmfifo ; fi +# FIXME: this is just way too complex +FIFOFILE=`grep '^ServAuthDir=' %{sysconfdir}/X11/gdm/gdm.conf | sed -e 's/^ServAuthDir=//'` +if test x$FIFOFILE = x ; then + FIFOFILE=%{localstatedir}/gdm/.gdmfifo +else + FIFOFILE="$FIFOFILE"/.gdmfifo +fi +PIDFILE=`grep '^PidFile=' %{sysconfdir}/X11/gdm/gdm.conf | sed -e 's/^PidFile=//'` +if test x$PIDFILE = x ; then + PIDFILE=/var/run/gdm.pid +fi +if test -w $FIFOFILE ; then + if test -f $PIDFILE ; then + if kill -0 `cat $PIDFILE` ; then + (echo;echo SOFT_RESTART) >> $FIFOFILE + fi + fi +fi # ignore error in the above exit 0 |