bundle_util_file_write() has now 'flags' parameter.
[udpgate.git] / src / startup-chkconfig.c
index 6c0aa0d..b9891e5 100644 (file)
@@ -66,7 +66,10 @@ const gchar *command="chkconfig " PACKAGE " 2>/dev/null";
 static gboolean udpgate_startup_chkconfig_query(UdpgateStartup *udpgate_startup,gboolean *is_on)
 {
 int status,status_0_1;
-const gchar *command="chkconfig " PACKAGE;
+/* FC4 chkconfig-1.3.20-1 dumps its help to stderr and returns 1 for: chkconfig PACKAGE
+ * without its existing: /etc/init.d/PACKAGE
+ */
+const gchar *command="chkconfig " PACKAGE " 2>/dev/null";
 
        g_return_val_if_fail(UDPGATE_IS_STARTUP_CHKCONFIG(udpgate_startup),FALSE);
 
@@ -93,7 +96,7 @@ int status;
                        INIT_D_PATHNAME,        /* pathname */
                        PACKAGE ".init",        /* basename */
                        0755,   /* pathname_mode */
-                       TRUE))  /* pathname_backup */
+                       BUNDLE_UTIL_BACKUP_MASK))       /* flags */
                return FALSE;
 #endif /* ENABLE_BUNDLE */