Commit 85b13d85 authored by Brian Cameron's avatar Brian Cameron

add check for fbconsole (fallback (console) add call to start fbconsole

        * acconfig.h, configure.in: add check for fbconsole (fallback
          (console)
        * daemon/server.c: add call to start fbconsole (if present)
          after the Xserver starts.
parent c0052fcf
Wed Aug 13 Brian Cameron <Brian.Cameron@Sun.COM>
* acconfig.h, configure.in: add check for fbconsole (fallback
(console)
* daemon/server.c: add call to start fbconsole (if present)
after the Xserver starts.
Tue Aug 12 17:48:45 2003 George Lebl <jirka@5z.com> Tue Aug 12 17:48:45 2003 George Lebl <jirka@5z.com>
* daemon/gdm.c: check operating system on startup * daemon/gdm.c: check operating system on startup
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#undef ENABLE_NLS #undef ENABLE_NLS
#undef HAVE_CATGETS #undef HAVE_CATGETS
#undef HAVE_DEFOPEN #undef HAVE_DEFOPEN
#undef HAVE_FBCONSOLE
#undef HAVE_GETTEXT #undef HAVE_GETTEXT
#undef HAVE_LC_MESSAGES #undef HAVE_LC_MESSAGES
#undef HAVE_STPCPY #undef HAVE_STPCPY
......
...@@ -225,7 +225,7 @@ if test x$have_pam = xno; then ...@@ -225,7 +225,7 @@ if test x$have_pam = xno; then
AC_DEFINE(HAVE_SHADOW) AC_DEFINE(HAVE_SHADOW)
elif test x$enable_authentication_scheme != xcrypt ; then elif test x$enable_authentication_scheme != xcrypt ; then
# Check for shadow passwords (hack) # Check for shadow passwords (hack)
AC_MSG_CHECKING("for /etc/shadow") AC_MSG_CHECKING(for /etc/shadow)
if test -f /etc/shadow; then if test -f /etc/shadow; then
VRFY="verify-shadow" VRFY="verify-shadow"
...@@ -504,6 +504,14 @@ EXPANDED_LOGDIR=`eval echo $LOGDIR_TMP` ...@@ -504,6 +504,14 @@ EXPANDED_LOGDIR=`eval echo $LOGDIR_TMP`
AC_SUBST(EXPANDED_LOGDIR) AC_SUBST(EXPANDED_LOGDIR)
AC_DEFINE_UNQUOTED(EXPANDED_LOGDIR,"$EXPANDED_LOGDIR") AC_DEFINE_UNQUOTED(EXPANDED_LOGDIR,"$EXPANDED_LOGDIR")
AC_MSG_CHECKING(for fbconsole)
if test -x /usr/openwin/bin/fbconsole; then
AC_DEFINE(HAVE_FBCONSOLE)
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
if test -x /usr/X11R6/bin/X; then if test -x /usr/X11R6/bin/X; then
X_PATH="/usr/bin/X11:/usr/X11R6/bin:/opt/X11R6/bin" X_PATH="/usr/bin/X11:/usr/X11R6/bin:/opt/X11R6/bin"
X_SERVER_PATH="/usr/X11R6/bin" X_SERVER_PATH="/usr/X11R6/bin"
......
...@@ -134,6 +134,32 @@ jumpback_xioerror_handler (Display *disp) ...@@ -134,6 +134,32 @@ jumpback_xioerror_handler (Display *disp)
Longjmp (reinitjmp, 1); Longjmp (reinitjmp, 1);
} }
#ifdef HAVE_FBCONSOLE
#define FBCONSOLE "/usr/openwin/bin/fbconsole"
static void
gdm_exec_fbconsole(GdmDisplay *disp)
{
pid_t pid;
char *argv[6];
argv[0] = FBCONSOLE;
argv[1] = "-d";
argv[2] = disp->name;
argv[3] = NULL;
pid = fork ();
if (pid == 0) {
gdm_close_all_descriptors (0 /* from */, -1 /* except */, -1 /* except2 */)
;
IGNORE_EINTR (execv (argv[0], argv));
}
if (pid == -1) {
gdm_error (_("Can not start fallback console"));
}
}
#endif
/** /**
* gdm_server_reinit: * gdm_server_reinit:
* @disp: Pointer to a GdmDisplay structure * @disp: Pointer to a GdmDisplay structure
...@@ -215,10 +241,14 @@ gdm_server_reinit (GdmDisplay *disp) ...@@ -215,10 +241,14 @@ gdm_server_reinit (GdmDisplay *disp)
/* Wait for the SIGUSR1 */ /* Wait for the SIGUSR1 */
do_server_wait (d); do_server_wait (d);
if (d->servstat == SERVER_RUNNING) if (d->servstat == SERVER_RUNNING) {
#ifdef HAVE_FBCONSOLE
gdm_exec_fbconsole(d);
#endif
return TRUE; return TRUE;
else } else {
return FALSE; return FALSE;
}
} }
/** /**
...@@ -687,6 +717,10 @@ gdm_server_start (GdmDisplay *disp, gboolean treat_as_flexi, ...@@ -687,6 +717,10 @@ gdm_server_start (GdmDisplay *disp, gboolean treat_as_flexi,
gdm_slave_send_num (GDM_SOP_VT_NUM, d->vt); gdm_slave_send_num (GDM_SOP_VT_NUM, d->vt);
} }
#ifdef HAVE_FBCONSOLE
gdm_exec_fbconsole(d);
#endif
return TRUE; return TRUE;
default: default:
break; break;
......
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