summaryrefslogtreecommitdiff
path: root/x11/gnome-session/files/patch-gnome-session_logout.c
blob: f82aefdc7d2ed6a70a72848aaf1ea16092c0c6b9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
--- gnome-session/logout.c.orig	Sun May  9 15:45:34 2004
+++ gnome-session/logout.c	Sun May  9 15:48:29 2004
@@ -37,12 +37,20 @@
 
 static gchar *halt_command[] =
 {
+#ifdef __FreeBSD__
+  HALT_COMMAND, "-p", "now", NULL
+#else
   HALT_COMMAND, NULL
+#endif
 };
 
 static gchar *reboot_command[] =
 {
+#ifdef __FreeBSD__
+  REBOOT_COMMAND, "-r", "now", NULL
+#else
   REBOOT_COMMAND, NULL
+#endif
 };
 
 /* What action to take upon shutdown */
@@ -401,8 +409,12 @@
    */
   s = g_strconcat ("/var/lock/console/", g_get_user_name (), NULL);
   t = g_strconcat ("/var/run/console/", g_get_user_name (), NULL);
+#ifndef __FreeBSD__
   if (((geteuid () == 0) || g_file_exists (t) || g_file_exists(s)) &&
       access (halt_command[0], X_OK) == 0)
+#else
+  if (access (halt_command[0], X_OK) == 0)
+#endif
     {
       GtkWidget *title, *spacer;
       GtkWidget *action_vbox, *hbox;