1
|
#!/usr/local/bin/php -f
|
2
|
<?php
|
3
|
/* $Id$ */
|
4
|
/*
|
5
|
rc.banner
|
6
|
part of pfSense
|
7
|
Copyright (C) 2004 Scott Ullrich
|
8
|
All rights reserved
|
9
|
|
10
|
originally part of m0n0wall (http://m0n0.ch/wall)
|
11
|
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
|
12
|
All rights reserved.
|
13
|
|
14
|
Redistribution and use in source and binary forms, with or without
|
15
|
modification, are permitted provided that the following conditions are met:
|
16
|
|
17
|
1. Redistributions of source code must retain the above copyright notice,
|
18
|
this list of conditions and the following disclaimer.
|
19
|
|
20
|
2. Redistributions in binary form must reproduce the above copyright
|
21
|
notice, this list of conditions and the following disclaimer in the
|
22
|
documentation and/or other materials provided with the distribution.
|
23
|
|
24
|
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
25
|
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
26
|
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
27
|
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
|
28
|
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
29
|
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
30
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
31
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
32
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
33
|
POSSIBILITY OF SUCH DAMAGE.
|
34
|
*/
|
35
|
|
36
|
/* parse the configuration and include all functions used below */
|
37
|
require_once("config.inc");
|
38
|
require_once("functions.inc");
|
39
|
|
40
|
$version = chop(file_get_contents("{$g['etc_path']}/version"));
|
41
|
$buildtime = chop(file_get_contents("{$g['etc_path']}/version.buildtime"));
|
42
|
$platform = chop(file_get_contents("{$g['etc_path']}/platform"));
|
43
|
|
44
|
echo <<<EOD
|
45
|
|
46
|
*** This is pfSense version {$version} - {$platform} ***
|
47
|
|
48
|
LAN -> {$config['interfaces']['lan']['if']} -> {$config['interfaces']['lan']['ipaddr']}
|
49
|
WAN -> {$config['interfaces']['wan']['if']} -> {$config['interfaces']['wan']['ipaddr']}
|
50
|
EOD;
|
51
|
|
52
|
for ($i = 1; isset($config['interfaces']['opt' . $i]); $i++)
|
53
|
echo "\n OPT{$i} -> {$config['interfaces']['opt' . $i]['if']} -> " . $config['interfaces']['opt' . $i]['ipaddr'] .
|
54
|
"({$config['interfaces']['opt' . $i]['descr']})";
|
55
|
?>
|