summaryrefslogtreecommitdiffstats
path: root/etc/inc/config.inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-03-01 02:55:55 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-03-01 02:55:55 +0000
commit1fc6d183f3e7d396e8e14105c5ab9d0c1fdf8c41 (patch)
tree838dc6758bf50ca5d80360a60c5adf63f3917806 /etc/inc/config.inc
parentd8dc587b098c0391d37a7e8a58106e2a6871f148 (diff)
downloadpfsense-1fc6d183f3e7d396e8e14105c5ab9d0c1fdf8c41.zip
pfsense-1fc6d183f3e7d396e8e14105c5ab9d0c1fdf8c41.tar.gz
Seperate autodetection out of previous function
Diffstat (limited to 'etc/inc/config.inc')
-rw-r--r--etc/inc/config.inc27
1 files changed, 13 insertions, 14 deletions
diff --git a/etc/inc/config.inc b/etc/inc/config.inc
index 2a867d5..b401050 100644
--- a/etc/inc/config.inc
+++ b/etc/inc/config.inc
@@ -759,30 +759,29 @@ EOD;
if($noreboot <> true)
system_reboot_sync();
}
+}
- function autodetect_interface($ifname, $fp) {
- $iflist_prev = get_interface_list();
- echo <<<EOD
+function autodetect_interface($ifname, $fp) {
+ $iflist_prev = get_interface_list();
+ echo <<<EOD
Connect the {$ifname} interface now and make sure that the link is up.
Then press ENTER to continue.
EOD;
- fgets($fp);
- $iflist = get_interface_list();
+ fgets($fp);
+ $iflist = get_interface_list();
- foreach ($iflist_prev as $ifn => $ifa) {
- if (!$ifa['up'] && $iflist[$ifn]['up']) {
- echo "Detected link-up on interface {$ifn}.\n";
- return $ifn;
- }
+ foreach ($iflist_prev as $ifn => $ifa) {
+ if (!$ifa['up'] && $iflist[$ifn]['up']) {
+ echo "Detected link-up on interface {$ifn}.\n";
+ return $ifn;
}
-
- echo "No link-up detected.\n";
-
- return null;
}
+ echo "No link-up detected.\n";
+
+ return null;
}
function vlan_setup() {
OpenPOWER on IntegriCloud