rpms/rhgb/F-9 rhgb-9.0.0-inittab.patch, NONE, 1.1 rhgb.spec, 1.97, 1.98

Bill Nottingham (notting) fedora-extras-commits at redhat.com
Thu Apr 24 18:42:20 UTC 2008


Author: notting

Update of /cvs/extras/rpms/rhgb/F-9
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23387/F-9

Modified Files:
	rhgb.spec 
Added Files:
	rhgb-9.0.0-inittab.patch 
Log Message:
Go back to checking inittab (#444010)


rhgb-9.0.0-inittab.patch:

--- NEW FILE rhgb-9.0.0-inittab.patch ---
diff -up rhgb-9.0.0/src/main.c.foo rhgb-9.0.0/src/main.c
--- rhgb-9.0.0/src/main.c.foo	2008-04-24 11:00:36.000000000 -0400
+++ rhgb-9.0.0/src/main.c	2008-04-24 14:32:28.000000000 -0400
@@ -303,9 +303,23 @@ check_for_run (void)
   if (rc >= 0) return rc;
   if (!rhgb_found) return 1;
 
-  if (rc == -1)
-      rc = 0;
-
+  /* Check that the default runlevel is 5 */	
+  g_file_get_contents("/etc/inittab",&contents,&len, NULL);
+  if (!contents)
+    return 1;
+  args = g_strsplit(contents,"\n",0);
+  for (x = 0; args[x] ; x++) {
+    args[x] = g_strchug(args[x]);
+    if (!strncmp(args[x],"id:",3))
+      {
+	if (atoi(args[x]+3) != 5)
+	  rc = 1;
+	else
+	  rc = 0;
+      }
+  }
+  g_free(contents);
+  g_strfreev(args);
   return rc;
 }
 


Index: rhgb.spec
===================================================================
RCS file: /cvs/extras/rpms/rhgb/F-9/rhgb.spec,v
retrieving revision 1.97
retrieving revision 1.98
diff -u -r1.97 -r1.98
--- rhgb.spec	7 Apr 2008 01:12:22 -0000	1.97
+++ rhgb.spec	24 Apr 2008 18:41:43 -0000	1.98
@@ -3,7 +3,7 @@
 Summary: Red Hat Graphical Boot
 Name: rhgb
 Version: 9.0.0
-Release: 2%{?dist}
+Release: 3%{?dist}
 Epoch: 1
 URL: http://www.redhat.com/
 Source0: %{name}-%{version}.tar.gz
@@ -20,6 +20,7 @@
 Requires: inotify-tools
 
 Patch0: rhgb-9.0.0-new-color.patch
+Patch1: rhgb-9.0.0-inittab.patch
 
 %description
 Red Hat Graphical Boot provides a clean and simple interface to the boot process
@@ -27,6 +28,7 @@
 %prep
 %setup -q
 %patch0 -p1 -b .new-color
+%patch1 -p1 -b .inittab
 
 %build
 %configure
@@ -56,6 +58,9 @@
 %dir %{_sysconfdir}/rhgb/temp
 
 %changelog
+* Thu Apr 24 2008 Bill Nottingham <notting at redhat.com> - 1:9.0.0-3
+- as we're using inittab again, go back to reading it
+
 * Sun Apr  6 2008 Ray Strode <rstrode at redhat.com> - 1:9.0.0-2
 - Use lighter color
 




More information about the scm-commits mailing list