350 return ret;
351 }
352
353 /*--------------------------------------------------------------------------------------------------*/
354
355 /** Entry point for HAL daemon
356 *
357 * @param argc Number of arguments
358 * @param argv Array of arguments
359 * @return Exit code
360 */
361 int
362 main (int argc, char *argv[])
363 {
364 GMainLoop *loop;
365 guint sigterm_iochn_listener_source_id;
366 char *path;
367 char newpath[512];
368
369 openlog ("hald", LOG_PID, LOG_DAEMON);
370
371 g_type_init ();
372
373 if (getenv ("HALD_VERBOSE"))
374 hald_is_verbose = TRUE;
375 else
376 hald_is_verbose = FALSE;
377
378 /* our helpers are installed into libexec, so adjust out $PATH
379 * to include this at the end (since we want to overide in
380 * run-hald.sh and friends)
381 */
382 path = getenv ("PATH");
383 if (path != NULL) {
384 g_strlcpy (newpath, path, sizeof (newpath));
385 g_strlcat (newpath, ":", sizeof (newpath));
386 } else {
387 /* No PATH was set */
388 newpath[0] = '\0';
389 }
390
391 g_strlcat (newpath, PACKAGE_LIBEXEC_DIR, sizeof (newpath));
392 g_strlcat (newpath, ":", sizeof (newpath));
|
350 return ret;
351 }
352
353 /*--------------------------------------------------------------------------------------------------*/
354
355 /** Entry point for HAL daemon
356 *
357 * @param argc Number of arguments
358 * @param argv Array of arguments
359 * @return Exit code
360 */
361 int
362 main (int argc, char *argv[])
363 {
364 GMainLoop *loop;
365 guint sigterm_iochn_listener_source_id;
366 char *path;
367 char newpath[512];
368
369 openlog ("hald", LOG_PID, LOG_DAEMON);
370 #if !defined(GLIB_VERSION_2_36)
371 g_type_init ();
372 #endif
373 if (getenv ("HALD_VERBOSE"))
374 hald_is_verbose = TRUE;
375 else
376 hald_is_verbose = FALSE;
377
378 /* our helpers are installed into libexec, so adjust out $PATH
379 * to include this at the end (since we want to overide in
380 * run-hald.sh and friends)
381 */
382 path = getenv ("PATH");
383 if (path != NULL) {
384 g_strlcpy (newpath, path, sizeof (newpath));
385 g_strlcat (newpath, ":", sizeof (newpath));
386 } else {
387 /* No PATH was set */
388 newpath[0] = '\0';
389 }
390
391 g_strlcat (newpath, PACKAGE_LIBEXEC_DIR, sizeof (newpath));
392 g_strlcat (newpath, ":", sizeof (newpath));
|