1service x-vnd.Haiku-app_server {
2	env /system/boot/SetupEnvironment
3	launch /system/servers/app_server
4}
5
6target desktop {
7	env /system/boot/SetupEnvironment
8
9	service x-vnd.Be-TRAK {
10		launch /system/Tracker
11		legacy
12		on initial_volumes_mounted
13	}
14
15	service x-vnd.Be-TSKB {
16		launch /system/Deskbar
17		on initial_volumes_mounted
18	}
19
20	job x-vnd.Haiku-LaunchBox {
21		launch /system/apps/LaunchBox
22		if setting ~/config/settings/LaunchBox/main_settings autostart
23		on initial_volumes_mounted
24		legacy
25		no_safemode
26	}
27
28	service x-vnd.Be-POST {
29		launch /system/servers/mail_daemon
30		if setting ~/config/settings/Mail/new_mail_daemon DaemonAutoStarts
31		on initial_volumes_mounted
32		no_safemode
33	}
34
35	job user-bootscript {
36		launch /bin/sh ~/config/settings/boot/UserBootscript
37	}
38
39	job check-daylight-saving-time {
40		launch /system/bin/dstcheck
41	}
42
43	job update-time {
44		launch /system/preferences/Time --update
45		if setting ~/config/settings/networktime\ settings "synchronize at boot"
46		on network_available
47	}
48
49	job first-login {
50		launch /bin/sh /system/boot/PostInstallScript "first login" ~/config/settings/first_login /boot/system/boot/first-login
51		if file_exists ~/config/settings/first_login
52		requires x-vnd.Be-TSKB
53	}
54
55	job create-installer-link {
56		# When run from a read-only medium a.k.a. live desktop
57		if {
58			read_only
59			file_exists /boot/system/apps/Installer
60		}
61		launch /bin/ln -sf /boot/system/apps/Installer ~/Desktop/Installer
62	}
63}
64
65target first_boot {
66	job x-vnd.Haiku-FirstBootPrompt
67}
68
69target installer {
70	job x-vnd.Haiku-Installer
71}
72
73run {
74	if {
75		file_exists /system/bin/FirstBootPrompt
76		or {
77			not file_exists /boot/home/config/settings/Locale\ settings
78			read_only
79		}
80	}
81	then {
82		first_boot
83	}
84	else {
85		desktop
86	}
87}
88