Project

General

Profile

Download (14.8 KB) Statistics
| Branch: | Tag: | Revision:
1 58fdcb9c Scott Ullrich
<?php
2
/*
3
	installer.php
4
	part of pfSense (http://www.pfsense.com/)
5
	Copyright (C) 2010 Scott Ullrich <sullrich@gmail.com>
6
	All rights reserved.
7
8
	Redistribution and use in source and binary forms, with or without
9
	modification, are permitted provided that the following conditions are met:
10
11
	1. Redistributions of source code must retain the above copyright notice,
12
	   this list of conditions and the following disclaimer.
13
14
	2. Redistributions in binary form must reproduce the above copyright
15
	   notice, this list of conditions and the following disclaimer in the
16
	   documentation and/or other materials provided with the distribution.
17
18
	THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
19
	INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
20
	AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
21
	AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
22
	OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23
	SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24
	INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25
	CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26
	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27
	POSSIBILITY OF SUCH DAMAGE.
28
*/
29
30 8af6efa6 Scott Ullrich
require("globals.inc");
31 58fdcb9c Scott Ullrich
require("guiconfig.inc");
32
33 0a680367 Scott Ullrich
// Handle other type of file systems
34
if($_REQUEST['fstype']) 
35
	$fstype = strtoupper($_REQUEST['fstype']);
36
else 
37
	$fstype = "UFS+S";
38
39 6bd7a614 Scott Ullrich
if($g['platform'] == "pfSense" or $g['platform'] == "nanobsd") {
40
	Header("Location: /index.php");
41
	exit;
42
}
43
44 5d4f96c6 Scott Ullrich
// Main switch dispatcher
45
switch ($_REQUEST['state']) {
46
	case "quickeasyinstall":
47
		quickeasyinstall_gui();
48
		break;
49
	case "update_installer_status":
50
		update_installer_status();
51
		exit;
52
	default:
53
		installer_main();	
54
}
55
56 58fdcb9c Scott Ullrich
function write_out_pc_sysinstaller_config($disk) {
57 0a680367 Scott Ullrich
	global $fstype;
58 58fdcb9c Scott Ullrich
	$fd = fopen("/PCBSD/pc-sysinstall/examples/pfSense-install.cfg", "w");
59
	if(!$fd) {
60
		return true;
61
	}
62
	$config = <<<EOF
63
# Sample configuration file for an installation using pc-sysinstall
64
65
installMode=fresh
66
installInteractive=yes
67
installType=FreeBSD
68
installMedium=LiveCD
69
70
# Set the disk parameters
71
disk0={$disk}
72
partition=all
73
bootManager=bsd
74
commitDiskPart
75
76
# Setup the disk label
77
# All sizes are expressed in MB
78
# Avail FS Types, UFS, UFS+S, UFS+J, ZFS, SWAP
79
# Size 0 means use the rest of the slice size
80 0a680367 Scott Ullrich
disk0-part={$fstype} 0 / 
81 58fdcb9c Scott Ullrich
# Do it now!
82
commitDiskLabel
83
84
# Set if we are installing via optical, USB, or FTP
85
installType=FreeBSD
86
87
packageType=cpdup
88
89
# Optional Components
90
cpdupPaths=boot,COPYRIGHT,bin,conf,conf.default,dev,etc,home,kernels,libexec,lib,root,sbin,sys,usr,var
91
92 9c6421ee Scott Ullrich
# runExtCommand=chmod a+rx /usr/local/bin/after_installation_routines.sh && cd / && /usr/local/bin/after_installation_routines.sh
93 58fdcb9c Scott Ullrich
EOF;
94
	fwrite($fd, $config);
95
	fclose($fd);
96
	return;
97
}
98
99
function start_installation() {
100 a33cb07c Scott Ullrich
	global $g, $fstype;
101 dcf479cf Scott Ullrich
	if(file_exists("/tmp/install_complete"))
102
		return;
103 1810b771 Scott Ullrich
	$ps_running = exec("ps awwwux | grep -v grep | grep 'sh /tmp/installer.sh'");
104
	if($ps_running)	
105
		return;
106 58fdcb9c Scott Ullrich
	$fd = fopen("/tmp/installer.sh", "w");
107 5d4f96c6 Scott Ullrich
	if(!$fd) {
108 65effce3 Rafael Lucas
		die(gettext("Could not open /tmp/installer.sh for writing"));
109 5d4f96c6 Scott Ullrich
		exit;
110 691f8475 Scott Ullrich
	}
111 4ec765b7 Scott Ullrich
	fwrite($fd, "rm /tmp/.pc-sysinstall/pc-sysinstall.log 2>/dev/null\n");
112 9c6421ee Scott Ullrich
	fwrite($fd, "/PCBSD/pc-sysinstall/pc-sysinstall -c /PCBSD/pc-sysinstall/examples/pfSense-install.cfg \n");
113
	fwrite($fd, "chmod a+rx /usr/local/bin/after_installation_routines.sh\n");
114
	fwrite($fd, "cd / && /usr/local/bin/after_installation_routines.sh\n");
115 1a99877d Scott Ullrich
	fwrite($fd, "mkdir /mnt/tmp\n");
116 f5fb2034 Scott Ullrich
	fwrite($fd, "umount /mnt\n");
117 9c6421ee Scott Ullrich
	fwrite($fd, "touch /tmp/install_complete\n");
118 58fdcb9c Scott Ullrich
	fclose($fd);
119
	exec("chmod a+rx /tmp/installer.sh");
120
	mwexec_bg("sh /tmp/installer.sh");
121
}
122
123
function installer_find_first_disk() {
124 a33cb07c Scott Ullrich
	global $g, $fstype;
125 58fdcb9c Scott Ullrich
	$disk = `/PCBSD/pc-sysinstall/pc-sysinstall disk-list | head -n1 | cut -d':' -f1`;
126
	return $disk;
127
}
128
129
function update_installer_status() {
130 38405d27 Scott Ullrich
	global $g, $fstype;
131 8af6efa6 Scott Ullrich
	// Ensure status files exist
132
	if(!file_exists("/tmp/installer_installer_running"))
133
		touch("/tmp/installer_installer_running");
134 429650ed Scott Ullrich
	$status = `cat /tmp/.pc-sysinstall/pc-sysinstall.log`;
135 73531eb1 Scott Ullrich
	$status = str_replace("\n", "\\n", $status);
136
	$status = str_replace("\n", "\\r", $status);
137 8af6efa6 Scott Ullrich
	echo "this.document.forms[0].installeroutput.value='$status';\n";
138 429650ed Scott Ullrich
	echo "this.document.forms[0].installeroutput.scrollTop = this.document.forms[0].installeroutput.scrollHeight;\n";	
139 8af6efa6 Scott Ullrich
	// Find out installer progress
140 8a4cf948 Scott Ullrich
	$progress = "5";
141
	if(strstr($status, "Running: dd")) 
142
		$progress = "6";
143
	if(strstr($status, "Running: gpart create -s GPT")) 
144
		$progress = "7";
145
	if(strstr($status, "Running: gpart bootcode")) 
146
		$progress = "7";
147
	if(strstr($status, "Running: newfs -U")) 
148
		$progress = "8";
149
	if(strstr($status, "Running: sync")) 
150
		$progress = "9";
151 8af6efa6 Scott Ullrich
	if(strstr($status, "/boot /mnt/boot")) 
152 73531eb1 Scott Ullrich
		$progress = "10";
153 8af6efa6 Scott Ullrich
	if(strstr($status, "/COPYRIGHT /mnt/COPYRIGHT"))
154 9c6421ee Scott Ullrich
		$progress = "11";
155 8af6efa6 Scott Ullrich
	if(strstr($status, "/bin /mnt/bin"))
156 9c6421ee Scott Ullrich
		$progress = "12";
157 8af6efa6 Scott Ullrich
	if(strstr($status, "/conf /mnt/conf"))
158 9c6421ee Scott Ullrich
		$progress = "15";
159 8af6efa6 Scott Ullrich
	if(strstr($status, "/conf.default /mnt/conf.default"))
160 9c6421ee Scott Ullrich
		$progress = "20";
161 8af6efa6 Scott Ullrich
	if(strstr($status, "/dev /mnt/dev"))
162 9c6421ee Scott Ullrich
		$progress = "25";
163 8af6efa6 Scott Ullrich
	if(strstr($status, "/etc /mnt/etc"))
164 9c6421ee Scott Ullrich
		$progress = "30";
165 8af6efa6 Scott Ullrich
	if(strstr($status, "/home /mnt/home"))
166 9c6421ee Scott Ullrich
		$progress = "35";
167 8af6efa6 Scott Ullrich
	if(strstr($status, "/kernels /mnt/kernels"))
168 9c6421ee Scott Ullrich
		$progress = "40";
169 8af6efa6 Scott Ullrich
	if(strstr($status, "/libexec /mnt/libexec"))
170 9c6421ee Scott Ullrich
		$progress = "50";
171 8af6efa6 Scott Ullrich
	if(strstr($status, "/lib /mnt/lib"))
172 9c6421ee Scott Ullrich
		$progress = "60";
173 8af6efa6 Scott Ullrich
	if(strstr($status, "/root /mnt/root"))
174 73531eb1 Scott Ullrich
		$progress = "70";
175 8af6efa6 Scott Ullrich
	if(strstr($status, "/sbin /mnt/sbin"))
176 73531eb1 Scott Ullrich
		$progress = "75";
177 8af6efa6 Scott Ullrich
	if(strstr($status, "/sys /mnt/sys"))
178 73531eb1 Scott Ullrich
		$progress = "80";
179 8af6efa6 Scott Ullrich
	if(strstr($status, "/usr /mnt/usr"))
180 73531eb1 Scott Ullrich
		$progress = "95";
181 8af6efa6 Scott Ullrich
	if(strstr($status, "/usr /mnt/usr"))
182
		$progress = "90";
183 73531eb1 Scott Ullrich
	if(strstr($status, "/var /mnt/var"))
184
		$progress = "95";
185 8a4cf948 Scott Ullrich
	if(strstr($status, "cap_mkdb /etc/login.conf"))
186
		$progress = "96";
187
	if(strstr($status, "Setting hostname"))
188
		$progress = "97";
189
	if(strstr($status, "umount -f /mnt"))
190
		$progress = "98";
191
	if(strstr($status, "umount -f /mnt"))
192
		$progress = "99";
193 8af6efa6 Scott Ullrich
	if(strstr($status, "Installation finished"))
194
		$progress = "100";
195 38405d27 Scott Ullrich
	// Check for error and bail if we see one.
196
	if(stristr($status, "error")) {
197
		$error = true;
198 b12cc599 Scott Ullrich
		echo "\$('installerrunning').innerHTML='<img class=\"infoboxnpimg\" src=\"/themes/{$g['theme']}/images/icons/icon_exclam.gif\"> <font size=\"2\"><b>An error occurred.  Aborting installation.'; ";
199 38405d27 Scott Ullrich
		echo "\$('progressbar').style.width='100%';\n";
200 50d44909 Scott Ullrich
		unlink("/tmp/install_complete");
201 58fdcb9c Scott Ullrich
		return;
202 38405d27 Scott Ullrich
	}
203 73531eb1 Scott Ullrich
	$running_old = trim(file_get_contents("/tmp/installer_installer_running"));
204
	if($installer_running <> "running") {
205
		$ps_running = exec("ps awwwux | grep -v grep | grep 'sh /tmp/installer.sh'");
206
		if($ps_running)	{
207 a33cb07c Scott Ullrich
			$running = "\$('installerrunning').innerHTML='<table><tr><td valign=\"middle\"><img src=\"/themes/{$g['theme']}/images/misc/loader.gif\"></td><td valign=\"middle\">&nbsp;<font size=\"2\"><b>Installer running ({$progress}% completed)...</td></tr></table>'; ";
208 73531eb1 Scott Ullrich
			if($running_old <> $running) {
209
				echo $running;
210
				file_put_contents("/tmp/installer_installer_running", "$running");			
211
			}
212
		}
213
	}
214
	if($progress) 
215
		echo "\$('progressbar').style.width='{$progress}%';\n";
216 58fdcb9c Scott Ullrich
	if(file_exists("/tmp/install_complete")) {
217 b12cc599 Scott Ullrich
		echo "\$('installerrunning').innerHTML='<img class=\"infoboxnpimg\" src=\"/themes/{$g['theme']}/images/icons/icon_exclam.gif\"> <font size=\"+1\">Installation completed.  Please <a href=\"reboot.php\">reboot</a> to continue';\n";
218 58fdcb9c Scott Ullrich
		unlink_if_exists("/tmp/installer.sh");
219 8af6efa6 Scott Ullrich
		file_put_contents("/tmp/installer_installer_running", "finished");
220 58fdcb9c Scott Ullrich
	}
221
}
222
223
function update_installer_status_win($status) {
224 a33cb07c Scott Ullrich
	global $g, $fstype;
225 58fdcb9c Scott Ullrich
	echo "<script type=\"text/javascript\">\n";
226 73531eb1 Scott Ullrich
	echo "	\$('installeroutput').value = '" . str_replace(htmlentities($status), "\n", "") . "';\n";
227 58fdcb9c Scott Ullrich
	echo "</script>";
228
}
229
230
function begin_quick_easy_install() {
231 a33cb07c Scott Ullrich
	global $g, $fstype;
232 b5cff707 Scott Ullrich
	if(file_exists("/tmp/install_complete"))
233
		return;
234 58fdcb9c Scott Ullrich
	unlink_if_exists("/tmp/install_complete");
235
	$disk = installer_find_first_disk();
236
	if(!$disk) {
237
		// XXX: hide progress bar
238 65effce3 Rafael Lucas
		$savemsg = gettext("Could not find a suitable disk for installation");
239
		update_installer_status_win(gettext("Could not find a suitable disk for installation."));
240 58fdcb9c Scott Ullrich
		return;
241
	}
242
	write_out_pc_sysinstaller_config($disk);
243 65effce3 Rafael Lucas
	update_installer_status_win(sprintf(gettext("Beginning installation on disk %s."),$disk));
244 58fdcb9c Scott Ullrich
	start_installation();
245
}
246
247 38405d27 Scott Ullrich
function head_html() {
248 a33cb07c Scott Ullrich
	global $g, $fstype;
249 38405d27 Scott Ullrich
	echo <<<EOF
250
<html>
251
	<head>
252
		<style type='text/css'>
253
			a:link { 
254
				color: #000000;
255
				text-decoration:underline;
256
				font-size:14;
257
			}
258
			a:visited { 
259
				color: #000000;
260
				text-decoration:underline;
261
				font-size:14;
262
			}
263
			a:hover { 
264
				color: #FFFF00;
265
				text-decoration: none;
266
				font-size:14;
267
			}
268
			a:active { 
269
				color: #FFFF00;
270
				text-decoration:underline;
271
				font-size:14;
272
			}
273
		</style>
274
	</head>
275
EOF;
276
277
}
278
279 5d4f96c6 Scott Ullrich
function body_html() {
280 a33cb07c Scott Ullrich
	global $g, $fstype;
281 5d4f96c6 Scott Ullrich
	$pfSversion = str_replace("\n", "", file_get_contents("/etc/version"));
282
	if(strstr($pfSversion, "1.2"))
283
		$one_two = true;
284 97fc7767 Vinicius Coque
	$pgtitle = "{$g['product_name']}: " . gettext("Installer");
285 5d4f96c6 Scott Ullrich
	include("head.inc");
286
	echo <<<EOF
287
	<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
288
	<script src="/javascript/scriptaculous/prototype.js" type="text/javascript"></script>
289 73531eb1 Scott Ullrich
	<script type="text/javascript">
290
		function getinstallerprogress() {
291
			url = 'installer.php';
292
			pars = 'state=update_installer_status';
293
			callajax(url, pars, installcallback);
294
		}
295
		function callajax(url, pars, activitycallback) {
296
			var myAjax = new Ajax.Request(
297
				url,
298
				{
299
					method: 'post',
300
					parameters: pars,
301
					onComplete: activitycallback
302
				});
303
		}
304
		function installcallback(transport) {
305
			setTimeout('getinstallerprogress()', 2000);
306
			eval(transport.responseText);
307
		}
308 5d4f96c6 Scott Ullrich
	</script>
309
EOF;
310 58fdcb9c Scott Ullrich
311 309b3a20 Scott Ullrich
	if($one_two)
312 5d4f96c6 Scott Ullrich
		echo "<p class=\"pgtitle\">{$pgtitle}</font></p>";
313 58fdcb9c Scott Ullrich
314 5d4f96c6 Scott Ullrich
	if ($savemsg) print_info_box($savemsg); 
315 58fdcb9c Scott Ullrich
}
316
317 5d4f96c6 Scott Ullrich
function end_html() {
318 a33cb07c Scott Ullrich
	global $g, $fstype;
319 5d4f96c6 Scott Ullrich
	echo "</form>";
320
	echo "</body>";
321
	echo "</html>";
322 58fdcb9c Scott Ullrich
}
323
324
function template() {
325 a33cb07c Scott Ullrich
	global $g, $fstype;
326 38405d27 Scott Ullrich
	head_html();
327 5d4f96c6 Scott Ullrich
	body_html();
328
	echo <<<EOF
329
	<div id="mainlevel">
330
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
331
	 		<tr>
332
	    		<td>
333
					<div id="mainarea">
334
						<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
335
							<tr>
336
	     						<td class="tabcont" >
337
	      							<form action="installer.php" method="post">
338
									<div id="pfsensetemplate">
339
340
341
									</div>
342
	     						</td>
343
							</tr>
344
						</table>
345
					</div>
346
				</td>
347
			</tr>
348
		</table>
349
	</div>
350 58fdcb9c Scott Ullrich
EOF;
351 5d4f96c6 Scott Ullrich
	end_html();
352 58fdcb9c Scott Ullrich
}
353
354
function quickeasyinstall_gui() {
355 a33cb07c Scott Ullrich
	global $g, $fstype;
356 38405d27 Scott Ullrich
	head_html();
357 5d4f96c6 Scott Ullrich
	body_html();
358 73531eb1 Scott Ullrich
	echo "<form action=\"installer.php\" method=\"post\" state=\"step1_post\">";
359 8af6efa6 Scott Ullrich
	page_table_start();
360 58fdcb9c Scott Ullrich
	echo <<<EOF
361 8af6efa6 Scott Ullrich
	<center>
362
		<table width="100%">
363
		<tr><td>
364
			<div id="mainlevel">
365
				<table width="100%" border="0" cellpadding="0" cellspacing="0">
366
			 		<tr>
367
			    		<td>
368
							<div id="mainarea">
369 824f539d Scott Ullrich
								<table width="100%" border="0" cellpadding="0" cellspacing="0">
370 8af6efa6 Scott Ullrich
									<tr>
371 824f539d Scott Ullrich
			     						<td>
372 8af6efa6 Scott Ullrich
											<div id="pfsenseinstaller" width="100%">
373 50d44909 Scott Ullrich
												<div id='installerrunning' width='100%' style="padding:8px; border:1px dashed #000000">
374 73531eb1 Scott Ullrich
													<table>
375
														<tr>
376
															<td valign="middle">
377
																<img src="/themes/{$g['theme']}/images/misc/loader.gif">
378
															</td>
379
															<td valign="middle">
380
																&nbsp;<font size="2"><b>Starting Installer...  Please wait...
381
															</td>
382
														</tr>
383
													</table>
384 8af6efa6 Scott Ullrich
												</div>
385
												<br/>
386 0a680367 Scott Ullrich
												<center>
387 73531eb1 Scott Ullrich
												<table height='15' width='640' border='0' colspacing='0' cellpadding='0' cellspacing='0'>
388 8af6efa6 Scott Ullrich
													<tr>
389 73531eb1 Scott Ullrich
														<td background="./themes/the_wall/images/misc/bar_left.gif" height='15' width='5'>
390 8af6efa6 Scott Ullrich
														</td>
391
														<td>
392 73531eb1 Scott Ullrich
															<table id="progholder" name="progholder" height='15' width='630' border='0' colspacing='0' cellpadding='0' cellspacing='0'>
393
																<td background="./themes/the_wall/images/misc/bar_gray.gif" valign="top" align="left">
394
																	<img src='./themes/the_wall/images/misc/bar_blue.gif' width='0' height='15' name='progressbar' id='progressbar'>
395
																</td>
396 8af6efa6 Scott Ullrich
															</table>
397
														</td>
398 73531eb1 Scott Ullrich
														<td background="./themes/the_wall/images/misc/bar_right.gif" height='15' width='5'>
399 8af6efa6 Scott Ullrich
														</td>
400
													</tr>
401
												</table>
402
												<br/>
403 691f8475 Scott Ullrich
												<textarea name='installeroutput' id='installeroutput' rows="31" cols="90">
404 8af6efa6 Scott Ullrich
												</textarea>
405
											</div>
406
			     						</td>
407
									</tr>
408
								</table>
409
							</div>
410
						</td>
411
					</tr>
412
				</table>
413
			</div>
414
		</td></tr>
415 5d4f96c6 Scott Ullrich
		</table>
416 8af6efa6 Scott Ullrich
	</center>
417 5d4f96c6 Scott Ullrich
	<script type="text/javascript">setTimeout('getinstallerprogress()', 250);</script>
418 8af6efa6 Scott Ullrich
419 58fdcb9c Scott Ullrich
EOF;
420 8af6efa6 Scott Ullrich
	page_table_end();
421 5d4f96c6 Scott Ullrich
	end_html();
422 1810b771 Scott Ullrich
	begin_quick_easy_install();
423 58fdcb9c Scott Ullrich
}
424
425 8af6efa6 Scott Ullrich
function page_table_start() {
426 a33cb07c Scott Ullrich
	global $g, $fstype;
427 c9418f04 Scott Ullrich
	echo <<<EOF
428 8af6efa6 Scott Ullrich
	<center>
429 50d44909 Scott Ullrich
		<img border="0" src="./themes/{$g['theme']}/images/logo.gif"></a><br/>
430
		<table cellpadding="6" cellspacing="0" width="640" height="480" style="border:1px solid #000000">
431 8af6efa6 Scott Ullrich
		<tr height="10" bgcolor="#990000">
432
			<td style="border-bottom:1px solid #000000">
433
				<font color='white'>
434
					<b>
435 50d44909 Scott Ullrich
						{$g['product_name']} installer
436 8af6efa6 Scott Ullrich
					</b>
437
				</font>
438
			</td>
439
		</tr>
440
		<tr>
441
			<td>
442
443
EOF;
444
445
}
446
447
function page_table_end() {
448 a33cb07c Scott Ullrich
	global $g, $fstype;
449 8af6efa6 Scott Ullrich
	echo <<<EOF
450
			</td>
451
		</tr>
452
		</table>
453
	</center>
454
455
EOF;
456
	
457 58fdcb9c Scott Ullrich
}
458
459
function installer_main() {
460 a33cb07c Scott Ullrich
	global $g, $fstype;
461 8a4cf948 Scott Ullrich
	if(file_exists("/tmp/.pc-sysinstall/pc-sysinstall.log")) 
462
		unlink("/tmp/.pc-sysinstall/pc-sysinstall.log");
463 38405d27 Scott Ullrich
	head_html();
464 5d4f96c6 Scott Ullrich
	body_html();
465 a33cb07c Scott Ullrich
	// Only enable ZFS if this exists.  The install will fail otherwise.
466
	if(file_exists("/boot/gptzfsboot")) 
467
		$zfs_enabled = "or <a href=\"installer.php?state=quickeasyinstall&fstype=ZFS\">ZFS</a> ";
468 5d4f96c6 Scott Ullrich
	$disk = installer_find_first_disk();
469
	if(!$disk) 
470 65effce3 Rafael Lucas
		echo gettext("WARNING: Could not find any suitable disks for installation.");
471 8af6efa6 Scott Ullrich
	page_table_start();
472 5d4f96c6 Scott Ullrich
	echo <<<EOF
473 8a4cf948 Scott Ullrich
		<form action="installer.php" method="post" state="step1_post">
474 8af6efa6 Scott Ullrich
			<div id="mainlevel">
475 8a4cf948 Scott Ullrich
				<center>
476 50d44909 Scott Ullrich
				<b><font face="arial" size="+2">Welcome to the {$g['product_name']} PCSysInstaller!</b></font><p/>
477
				<font face="arial" size="+1">This utility will install {$g['product_name']} to a hard disk, flash drive, etc.</font>
478 8af6efa6 Scott Ullrich
				<table width="100%" border="0" cellpadding="5" cellspacing="0">
479
			 		<tr>
480
			    		<td>
481 8a4cf948 Scott Ullrich
							<center>
482 8af6efa6 Scott Ullrich
							<div id="mainarea">
483
								<br/>
484 8a4cf948 Scott Ullrich
								<center>
485 8af6efa6 Scott Ullrich
								Please select an installer option to begin:
486 524b7a41 Scott Ullrich
								<table width="100%" border="0" cellpadding="5" cellspacing="5">
487 8af6efa6 Scott Ullrich
									<tr>
488 524b7a41 Scott Ullrich
			     						<td>
489 8af6efa6 Scott Ullrich
											<div id="pfsenseinstaller">
490 8a4cf948 Scott Ullrich
												<center>
491 38405d27 Scott Ullrich
												Rescue config.xml<p/>
492 50d44909 Scott Ullrich
												Install {$g['product_name']} using the <a href="installer.php?state=quickeasyinstall">UFS</a>
493 a33cb07c Scott Ullrich
												 {$zfs_enabled}
494 0a680367 Scott Ullrich
												filesystem.
495 8af6efa6 Scott Ullrich
												</p>
496
											</div>
497
			     						</td>
498
									</tr>
499
								</table>
500
							</div>
501
						</td>
502
					</tr>
503
				</table>
504
			</div>
505 58fdcb9c Scott Ullrich
EOF;
506 8af6efa6 Scott Ullrich
	page_table_end();
507 5d4f96c6 Scott Ullrich
	end_html();
508 58fdcb9c Scott Ullrich
}
509
510 65effce3 Rafael Lucas
?>