28
28
#include <sys/types.h>
29
29
#include <stdlib.h>
30
30
#include <signal.h>
33
35
#include <limits.h>
35
37
#include <glib/gstdio.h>
38
#include <glib-unix.h>
36
39
#include <gtk/gtk.h>
37
40
#include <gdk/gdkx.h>
38
41
#include <gio/gio.h>
40
43
#include "update-notifier.h"
44
#include "livepatch-tray.h"
41
45
#include "update.h"
50
#include "trayappletui.h"
49
52
/* some prototypes */
50
extern gboolean up_get_clipboard (void);
51
53
gboolean update_timer_finished(gpointer data);
53
// the time when we check for fam events
54
#define TIMEOUT_FAM 1000*5 /* 5 sec */
56
// the timeout (in msec) for apt-get update (changes in
57
// /var/lib/apt/lists{/partial})
58
#define TIMEOUT_APT_GET_UPDATE 1000*30 /* 30 sec */
55
// the time when we check for fam events, in seconds
56
#define TIMEOUT_FAM 180
60
58
// the timeout (in sec) when a further activity from dpkg/apt
61
59
// causes the applet to "ungray"
62
60
#define TIMEOUT_APT_RUN 600 /* 600 sec */
64
// force startup even if the user is not in the admin group
62
// force startup even if the user is not in the sudo/admin group
65
63
static gboolean FORCE_START=FALSE;
67
// force gksu for all menu actions
68
static gboolean FORCE_GKSU=FALSE;
65
// force pkexec for all menu actions
66
static gboolean FORCE_PKEXEC=FALSE;
70
68
// delay on startup (to make session startup faster)
71
69
static int STARTUP_DELAY=1;
89
88
const gchar *message,
90
89
gpointer user_data)
92
if (HOOK_DEBUG > 0 && strcmp(log_domain, "hooks") == 0)
93
g_log_default_handler (log_domain, log_level, message, user_data);
94
if (UPDATE_DEBUG > 0 && strcmp(log_domain, "update") == 0)
95
g_log_default_handler (log_domain, log_level, message, user_data);
96
if (INOTIFY_DEBUG > 0 && strcmp(log_domain, "inotify") == 0)
97
g_log_default_handler (log_domain, log_level, message, user_data);
98
if (FIRMWARE_DEBUG > 0 && strcmp(log_domain, "firmware") == 0)
99
g_log_default_handler (log_domain, log_level, message, user_data);
100
if (RELEASE_DEBUG > 0 && strcmp(log_domain, "release") == 0)
101
g_log_default_handler (log_domain, log_level, message, user_data);
91
if (log_domain && strcmp(log_domain, "hooks") == 0) {
93
g_log_default_handler (log_domain, log_level, message, user_data);
95
else if (log_domain && strcmp(log_domain, "update") == 0) {
97
g_log_default_handler (log_domain, log_level, message, user_data);
99
else if (log_domain && strcmp(log_domain, "inotify") == 0) {
101
g_log_default_handler (log_domain, log_level, message, user_data);
103
else if (log_domain && strcmp(log_domain, "uevent") == 0) {
105
g_log_default_handler (log_domain, log_level, message, user_data);
107
else if (log_domain && strcmp(log_domain, "release") == 0) {
109
g_log_default_handler (log_domain, log_level, message, user_data);
112
g_log_default_handler (log_domain, log_level, message, user_data);
104
115
static inline void
113
void invoke(const gchar *cmd, const gchar *desktop, gboolean with_gksu)
124
// launch async scripts one after another
125
static void start_next_script(GPid pid,
127
GSList *remaining_scripts_to_run)
129
if(remaining_scripts_to_run) {
130
gboolean ret = False;
131
gchar* full_path = remaining_scripts_to_run->data;
132
gchar *argv[] = { full_path, NULL };
134
g_debug_inotify ("executing: %s", full_path);
135
if (g_file_test(full_path, G_FILE_TEST_IS_EXECUTABLE ))
136
ret = g_spawn_async("/", argv, NULL, G_SPAWN_DO_NOT_REAP_CHILD, NULL, NULL, &pid, NULL);
137
remaining_scripts_to_run = g_slist_remove(remaining_scripts_to_run, full_path);
141
g_warning("script execution failed or not executable");
142
start_next_script(0, 0, remaining_scripts_to_run);
145
g_child_watch_add(pid, (GChildWatchFunc)start_next_script, remaining_scripts_to_run);
150
void invoke(const gchar *cmd, const gchar *desktop, gboolean with_pkexec)
115
152
GdkAppLaunchContext *context;
116
153
GAppInfo *appinfo;
117
154
GError *error = NULL;
118
155
static GtkWidget *w = NULL;
121
if(with_gksu || FORCE_GKSU) {
122
invoke_with_gksu(cmd, desktop, FALSE);
158
if(with_pkexec || FORCE_PKEXEC) {
159
invoke_with_pkexec(cmd);
133
context = gdk_app_launch_context_new ();
134
guint32 timestamp = gdk_x11_get_server_time (w->window);
170
context = gdk_display_get_app_launch_context (gdk_display_get_default ());
171
guint32 timestamp = gdk_x11_get_server_time (gtk_widget_get_window (w));
135
172
appinfo = g_app_info_create_from_commandline(cmd,
137
174
G_APP_INFO_CREATE_NONE,
139
176
gdk_app_launch_context_set_timestamp (context, timestamp);
140
177
if (!g_app_info_launch (appinfo, NULL, (GAppLaunchContext*)context, &error))
141
g_warning ("Launching failed: %s\n", error->message);
178
g_warning ("Launching failed: %s", error->message);
142
179
g_object_unref (context);
143
180
g_object_unref (appinfo);
148
invoke_with_gksu(const gchar *cmd, const gchar *descr, gboolean whole_message)
150
//g_print("invoke_update_manager ()\n");
152
argv[0] = "/usr/bin/gksu";
153
argv[1] = whole_message ? "--message" : "--desktop";
154
argv[2] = (gchar*)descr;
155
argv[3] = (gchar*)cmd;
158
g_spawn_async (NULL, argv, NULL, 0, NULL, NULL, NULL, NULL);
164
trayapplet_create (TrayApplet *un, char *name)
166
//g_print("trayicon_create()\n");
169
un->tray_icon = gtk_status_icon_new_from_icon_name (name);
171
gtk_status_icon_set_visible (un->tray_icon, FALSE);
185
invoke_with_pkexec(const gchar *cmd)
187
g_debug("invoke_with_pkexec ()");
189
argv[0] = "/usr/bin/pkexec";
190
argv[1] = (gchar*)cmd;
192
g_spawn_async (NULL, argv, NULL, G_SPAWN_DEFAULT, NULL, NULL, NULL, NULL);
198
g_debug("avahi disabled ()");
200
argv[0] = "/usr/lib/update-notifier/local-avahi-notification";
202
g_spawn_async (NULL, argv, NULL, G_SPAWN_DEFAULT, NULL, NULL, NULL, NULL);
205
void livepatch_check()
207
g_debug("livepatch_check ()");
209
argv[0] = "/usr/lib/update-notifier/livepatch-notification";
211
g_spawn_async (NULL, argv, NULL, G_SPAWN_DEFAULT, NULL, NULL, NULL, NULL);
215
trayapplet_create (TrayApplet *ta, UpgradeNotifier *un, char *name)
217
g_debug("trayapplet_create()");
178
226
the following files change:
198
246
gchar *info_uri = g_file_get_path(monitor_f);
200
g_debug_inotify("info_uri: %s\n", info_uri);
201
g_debug_inotify("event_type: %i\n",event_type);
248
g_debug_inotify("info_uri: %s", info_uri);
249
g_debug_inotify("event_type: %i",event_type);
204
// we ignore lock file events because we can only get
252
// we ignore lock file events because we can only get
205
253
// when a lock was taken, but not when it was removed
206
254
if(g_str_has_suffix(info_uri, "lock"))
209
257
// look for apt-get install/update
210
if(g_str_has_prefix(info_uri,"/var/lib/apt/")
258
if(g_str_has_prefix(info_uri,"/var/lib/apt/")
211
259
|| g_str_has_prefix(info_uri,"/var/cache/apt/")
212
260
|| strcmp(info_uri,"/var/lib/dpkg/status") == 0) {
213
261
g_debug_inotify("apt_get_running=TRUE");
214
un->apt_get_runing=TRUE;
262
un->apt_get_running=TRUE;
216
264
if(strstr(info_uri, "/var/lib/update-notifier/dpkg-run-stamp") ||
217
265
strstr(info_uri, "/var/lib/apt/periodic/update-success-stamp")) {
218
266
g_debug_inotify("dpkg_was_run=TRUE");
219
267
un->dpkg_was_run = TRUE;
221
if(strstr(info_uri, REBOOT_FILE)) {
222
g_debug_inotify("reboot required\n");
223
un->reboot_pending = TRUE;
225
269
if(strstr(info_uri, HOOKS_DIR)) {
226
g_debug_inotify("new hook!\n");
270
g_debug_inotify("new hook!");
227
271
un->hook_pending = TRUE;
229
273
if(strstr(info_uri, CRASHREPORT_DIR)) {
230
g_debug_inotify("crashreport found\n");
274
g_debug_inotify("crashreport found");
231
275
un->crashreport_pending = TRUE;
233
277
if(strstr(info_uri, UNICAST_LOCAL_AVAHI_FILE)) {
234
g_debug_inotify("avahi disabled due to unicast .local domain\n");
278
g_debug_inotify("avahi disabled due to unicast .local domain");
235
279
un->unicast_local_avahi_pending = TRUE;
281
if(strstr(info_uri, LIVEPATCH_FILE)) {
282
g_debug_inotify("livepatch status changed");
283
un->livepatch_pending = TRUE;
240
* We periodically check here what actions happend in this "time-slice".
288
* We periodically check here what actions happened in this "time-slice".
242
290
* - dpkg_was_run=TRUE: set when apt wrote the "dpkg-run-stamp" file
243
* - apt_get_runing: set when apt/dpkg activity is detected (in the
244
* lists-dir, archive-cache, or /var/lib/dpkg/status
245
* - hook_pending: we have new upgrade hoook information
246
* - reboot_pending: we need to reboot
291
* - apt_get_running: set when apt/dpkg activity is detected (in the
292
* lists-dir, archive-cache, or /var/lib/dpkg/status)
293
* - hook_pending: we have new upgrade hook information
247
294
* - crashreport_pending: we have a new crashreport
248
295
* - unicast_local_avahi_pending: avahi got disabled due to a unicast .local domain
296
* - livepatch_pending: livepatch status changed
251
gboolean file_monitor_periodic_check(gpointer data)
300
file_monitor_periodic_check(gpointer data)
254
302
UpgradeNotifier *un = (UpgradeNotifier *)data;
256
304
// we are not ready yet, wait for the next timeslice
257
if((un->reboot == NULL) || (un->crashreport == NULL))
305
if(un->crashreport == NULL)
260
// DPkg::Post-Invoke has written a stamp file, that means a install/remove
308
// DPkg::Post-Invoke has written a stamp file, that means an install/remove
261
309
// operation finished, we can show hooks/reboot notifications then
262
310
if(un->dpkg_was_run) {
265
313
update_check(un->update);
267
// any apt-get update must be finished, otherwise
315
// run cache-changed plugin scripts
316
GDir *dir = g_dir_open(CACHE_CHANGED_PLUGIN_DIR, 0, NULL);
317
const gchar *fname, *full_path;
318
GSList *cache_changed_scripts = NULL;
319
while ( (fname = g_dir_read_name(dir)) != NULL ) {
320
full_path = g_build_filename(CACHE_CHANGED_PLUGIN_DIR, fname, NULL);
321
cache_changed_scripts = g_slist_insert_sorted(cache_changed_scripts,
322
(gpointer)full_path, (GCompareFunc)g_strcmp0);
325
// launch first script and queue others
326
start_next_script(0, 0, cache_changed_scripts);
328
// any apt-get update must be finished, otherwise
268
329
// apt-get install wouldn't be finished
269
330
update_apt_is_running(un->update, FALSE);
270
331
if(un->update_finished_timer > 0)
271
332
g_source_remove(un->update_finished_timer);
273
// show pending hooks/reboots
274
if(un->hook_pending) {
275
//g_print("checking hooks now\n");
276
check_update_hooks(un->hook);
277
un->hook_pending = FALSE;
279
if(un->reboot_pending) {
280
//g_print("checking reboot now\n");
281
reboot_check (un->reboot);
282
un->reboot_pending = FALSE;
285
// apt must be finished when a new stamp file was writen, so we
286
// reset the apt_get_runing time-slice field because its not
287
// important anymore (it finished runing)
334
// apt must be finished when a new stamp file was written, so we
335
// reset the apt_get_running time-slice field because its not
336
// important anymore (it finished running)
289
338
// This may leave a 5s race condition when a apt-get install finished
290
339
// and something new (apt-get) was started
291
un->apt_get_runing = FALSE;
340
un->apt_get_running = FALSE;
292
341
un->last_apt_action = 0;
295
// apt-get update/install or dpkg is runing (and updates files in
296
// it's list/cache dir) or in /var/lib/dpkg/status
297
if(un->apt_get_runing)
344
// show pending hooks
345
if(un->hook_pending) {
346
//g_print("checking hooks now\n");
347
check_update_hooks(un->hook);
348
un->hook_pending = FALSE;
351
// apt-get update/install or dpkg is running (and updates files in
352
// its list/cache dir) or in /var/lib/dpkg/status
353
if(un->apt_get_running)
298
354
update_apt_is_running(un->update, TRUE);
300
356
// update time information for apt/dpkg
301
357
time_t now = time(NULL);
302
if(un->apt_get_runing)
358
if(un->apt_get_running)
303
359
un->last_apt_action = now;
305
361
// no apt operation for a long time
335
/* u_abort seems like an internal error notification.
336
* End user might not understand the message at all */
337
void u_abort(gchar *msg)
339
const char *fmt = "<span weight=\"bold\" size=\"larger\">%s</span>\n\n%s\n";
340
gtk_dialog_run(GTK_DIALOG(gtk_message_dialog_new_with_markup(NULL, 0,
350
397
// FIXME: get the apt directories with apt-config or something
352
399
monitor_init(UpgradeNotifier *un)
355
402
GFileMonitor *monitor_handle;
357
// monitor thise dirs
358
static const char *monitor_dirs[] = {
359
"/var/lib/apt/lists/", "/var/lib/apt/lists/partial/",
360
"/var/cache/apt/archives/", "/var/cache/apt/archives/partial/",
404
// monitor these dirs
405
static const char *monitor_dirs[] = {
406
"/var/lib/apt/lists/", "/var/lib/apt/lists/partial/",
407
"/var/cache/apt/archives/", "/var/cache/apt/archives/partial/",
364
411
for(i=0;monitor_dirs[i] != NULL;i++) {
412
if (getenv("UPSTART_SESSION") && monitor_dirs[i] == CRASHREPORT_DIR) {
365
415
GError *error = NULL;
366
416
GFile *gf = g_file_new_for_path(monitor_dirs[i]);
367
417
monitor_handle = g_file_monitor_directory(gf, 0, NULL, &error);
368
418
if(monitor_handle)
369
419
g_signal_connect(monitor_handle, "changed", (GCallback)monitor_cb, un);
371
g_warning("can not add '%s'\n", monitor_dirs[i]);
421
g_warning("can not add '%s'", monitor_dirs[i]);
374
424
// and those files
375
static const char *monitor_files[] = {
376
"/var/lib/dpkg/status",
377
"/var/lib/update-notifier/dpkg-run-stamp",
425
static const char *monitor_files[] = {
426
"/var/lib/dpkg/status",
427
"/var/lib/update-notifier/dpkg-run-stamp",
378
428
"/var/lib/apt/periodic/update-success-stamp",
380
429
UNICAST_LOCAL_AVAHI_FILE,
382
432
for(i=0;monitor_files[i] != NULL;i++) {
433
if (getenv("UPSTART_SESSION") && monitor_files[i] == UNICAST_LOCAL_AVAHI_FILE) {
383
436
GError *error = NULL;
384
437
GFile *gf = g_file_new_for_path(monitor_files[i]);
385
438
monitor_handle = g_file_monitor_file(gf, 0, NULL, &error);
386
439
if(monitor_handle)
387
440
g_signal_connect(monitor_handle, "changed", (GCallback)monitor_cb, un);
389
g_warning("can not add '%s'\n", monitor_dirs[i]);
442
g_warning("can not add '%s'", monitor_dirs[i]);
392
g_timeout_add (TIMEOUT_FAM, (GSourceFunc)file_monitor_periodic_check, un);
444
g_timeout_add_seconds (TIMEOUT_FAM,
445
(GSourceFunc)file_monitor_periodic_check, un);
404
457
//g_debug_inotify("tray_icons_init");
406
/* new upates tray icon */
459
/* new updates tray icon */
407
460
un->update = g_new0 (TrayApplet, 1);
409
462
// check if the updates icon should be displayed
410
463
if (in_admin_group() || FORCE_START) {
411
trayapplet_create(un->update, "software-update-available");
464
trayapplet_create(un->update, un, "software-update-available");
412
465
update_tray_icon_init(un->update);
414
467
un->update = NULL;
416
469
/* update hook icon*/
417
470
un->hook = g_new0 (TrayApplet, 1);
418
trayapplet_create(un->hook, "hook-notifier");
471
trayapplet_create(un->hook, un, "hook-notifier");
419
472
hook_tray_icon_init(un->hook);
421
/* reboot required icon */
422
un->reboot = g_new0 (TrayApplet, 1);
423
trayapplet_create(un->reboot, "reboot-notifier");
424
reboot_tray_icon_init(un->reboot);
426
474
/* crashreport detected icon */
427
475
un->crashreport = g_new0 (TrayApplet, 1);
428
trayapplet_create(un->crashreport, "apport");
476
trayapplet_create(un->crashreport, un, "apport");
429
477
crashreport_tray_icon_init(un->crashreport);
480
un->livepatch = g_new0(TrayApplet, 1);
481
trayapplet_create(un->livepatch, un, "livepatch");
482
livepatch_tray_icon_init(un->livepatch);
431
484
return FALSE; // for the tray_destroyed_cb
488
system_user(UpgradeNotifier *un)
437
/* do not start for system users, e.g. the guest session
490
/* do not start for system users, e.g. the guest session
438
491
* (see /usr/share/gdm/guest-session/guest-session-setup.sh)
440
493
int end_system_uid = 500;
441
GConfClient *gconf = gconf_client_get_default();
443
int i = gconf_client_get_int(gconf, GCONF_KEY_END_SYSTEM_UIDS, NULL);
494
int i = g_settings_get_int(un->settings, SETTINGS_KEY_END_SYSTEM_UIDS);
448
498
uid_t uid = getuid();
449
499
if (uid < end_system_uid)
470
519
i = getgroups (ng, groups);
476
525
for(i=0;i<ng;i++) {
477
526
if(groups[i] == grp->gr_gid) {
483
532
if(groups != NULL)
489
static GOptionEntry entries[] =
541
int is_admin, is_sudo;
543
// we consider the user an admin if the user is in the "sudo" or "admin"
544
// group or neither of these groups exist
545
is_admin = user_in_group("admin");
546
is_sudo = user_in_group("sudo");
547
return is_admin == 1 || is_sudo == 1 || (is_admin + is_sudo == 4);
552
sigint_cb (gpointer user_data __attribute__ ((__unused__)))
559
static GOptionEntry entries[] =
491
561
{ "debug-hooks", 0, 0, G_OPTION_ARG_NONE, &HOOK_DEBUG, "Enable hooks debugging"},
492
562
{ "debug-updates", 0, 0, G_OPTION_ARG_NONE, &UPDATE_DEBUG, "Enable updates/autolaunch debugging"},
493
563
{ "debug-inotify", 0, 0, G_OPTION_ARG_NONE, &INOTIFY_DEBUG, "Enable inotify debugging"},
494
{ "debug-firmware", 0, 0, G_OPTION_ARG_NONE, &FIRMWARE_DEBUG, "Enable firmware debugging"},
564
{ "debug-uevent", 0, 0, G_OPTION_ARG_NONE, &UEVENT_DEBUG, "Enable uevent debugging"},
495
565
{ "debug-new-release-check", 0, 0, G_OPTION_ARG_NONE, &RELEASE_DEBUG, "Enable new release check debugging"},
566
{ "debug-misc", 0, 0, G_OPTION_ARG_NONE, &MISC_DEBUG, "Enable uncategorized debug prints"},
496
567
{ "force", 0, 0, G_OPTION_ARG_NONE, &FORCE_START, "Force start even if the user is not in the admin group"},
497
{ "force-use-gksu", 0, 0, G_OPTION_ARG_NONE, &FORCE_GKSU, "Force running all commands (update-manager, synaptic) with gksu" },
568
{ "force-use-pkexec", 0, 0, G_OPTION_ARG_NONE, &FORCE_PKEXEC, "Force running all commands (update-manager, synaptic) with pkexec" },
498
569
{ "startup-delay", 0, 0, G_OPTION_ARG_INT, &STARTUP_DELAY, "Delay startup by given amount of seconds" },
499
570
{ "devel-release", 0, 0, G_OPTION_ARG_NONE, &DEVEL_RELEASE, "Make the release checker check for a new development release" },
500
571
{ "force-release-check", 0, 0, G_OPTION_ARG_NONE, &FORCE_RELEASE_CHECK, "Force release check" },
505
576
main (int argc, char **argv)
507
578
UpgradeNotifier *un;
508
579
GError *error = NULL;
511
if(!gtk_init_with_args (&argc, &argv,
512
_("- inform about updates"), entries,
584
if(!gtk_init_with_args (&argc, &argv,
585
_("- inform about updates"), entries,
513
586
"update-notifier", &error) ) {
514
fprintf(stderr, _("Failed to init the UI: %s\n"),
587
fprintf(stderr, _("Failed to init the UI: %s\n"),
515
588
error ? error->message : _("unknown error"));
519
592
notify_init("update-notifier");
520
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
521
bind_textdomain_codeset(PACKAGE, "UTF-8");
593
bindtextdomain(GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
594
bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
595
textdomain(GETTEXT_PACKAGE);
597
if (HOOK_DEBUG || UPDATE_DEBUG || INOTIFY_DEBUG ||
598
UEVENT_DEBUG || RELEASE_DEBUG || MISC_DEBUG)
599
g_setenv ("G_MESSAGES_DEBUG", "all", TRUE);
524
601
// setup a custom debug log handler
525
602
g_log_set_handler ("inotify", G_LOG_LEVEL_DEBUG,
539
618
//g_print("starting update-notifier\n");
620
/* Create the UpgradeNotifier object */
621
un = g_new0 (UpgradeNotifier, 1);
622
un->settings = g_settings_new(SETTINGS_SCHEMA);
541
624
// do not run as system user (e.g. guest user)
542
if (system_user() && !FORCE_START) {
543
g_warning("not starting for system user\n");
625
if (system_user(un) && !FORCE_START) {
626
g_warning("not starting for system user");
547
630
// do not run as system user (e.g. guest user)
548
if (FORCE_RELEASE_CHECK) {
549
GConfClient *gconf = gconf_client_get_default();
550
gconf_client_unset(gconf, GCONF_KEY_LAST_RELEASE_CHECK, NULL);
631
if (FORCE_RELEASE_CHECK)
632
g_settings_reset(un->settings, SETTINGS_KEY_LAST_RELEASE_CHECK);
553
634
// check if it is running already
554
if (!up_get_clipboard ()) {
555
g_warning ("already running?\n");
635
lockfn = g_build_filename (g_get_user_runtime_dir (), "update-notifier.pid", NULL);
636
pid_file = open (lockfn, O_CREAT | O_RDWR, 0600);
638
rc = flock(pid_file, LOCK_EX | LOCK_NB);
640
g_warning ("already running?");
559
/* Create the UpgradeNotifier object */
560
un = g_new0 (UpgradeNotifier, 1);
562
// check for .update-notifier dir and create if needed
563
gchar *dirname = g_strdup_printf("%s/.update-notifier",
644
// check for update-notifier dir and create if needed
645
gchar *dirname = g_strdup_printf("%s/update-notifier",
646
g_get_user_config_dir());
565
647
if(!g_file_test(dirname, G_FILE_TEST_IS_DIR))
566
648
g_mkdir(dirname, 0700);
569
// delay icon creation for 30s so that the desktop
651
// delay icon creation for 30s so that the desktop
570
652
// login is not slowed down by update-notifier
571
g_timeout_add_seconds(STARTUP_DELAY,
653
g_timeout_add_seconds(STARTUP_DELAY,
572
654
(GSourceFunc)(tray_icons_init), un);
574
// initial check for avahi
575
avahi_disabled_check();
577
/* setup hal so that inserted cdroms can be checked */
578
if(!up_do_hal_init(un)) {
579
g_warning("initializing gdu failed");
582
656
// init release checker
583
release_checker_init();
585
// init missing firmware monitoring
586
missing_firmware_init();
657
release_checker_init(un);
659
// init uevent monitoring (printer support, etc.)
664
/* check if livepatch patches has been applied during boot or before
665
update-notifier has started (see LP: #1800862) */
588
668
// init gio file monitoring
589
669
monitor_init (un);
591
671
/* Start the main gtk loop */
672
g_unix_signal_add_full (G_PRIORITY_DEFAULT, SIGINT, sigint_cb,