summaryrefslogtreecommitdiffstats
path: root/etc/inc/config.console.inc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2012-06-11 20:42:50 +0000
committerErmal <eri@pfsense.org>2012-06-11 20:42:50 +0000
commit62784b050ad874bd8544531954b4b158036f9a23 (patch)
tree8334c18c7aca955cec0744f1fdf573d26b583e67 /etc/inc/config.console.inc
parentcb1d821b8ac1406da66ac8ad08338560bc192d1c (diff)
downloadpfsense-62784b050ad874bd8544531954b4b158036f9a23.zip
pfsense-62784b050ad874bd8544531954b4b158036f9a23.tar.gz
Fixes #2490. If there is a descr set on the interface keep it and do not disable the iface
Diffstat (limited to 'etc/inc/config.console.inc')
-rw-r--r--etc/inc/config.console.inc8
1 files changed, 5 insertions, 3 deletions
diff --git a/etc/inc/config.console.inc b/etc/inc/config.console.inc
index 3855107..aaf54f3 100644
--- a/etc/inc/config.console.inc
+++ b/etc/inc/config.console.inc
@@ -405,8 +405,10 @@ EODD;
unset($config['interfaces']['opt' . ($i+1)]['wireless']);
}
- unset($config['interfaces']['opt' . ($i+1)]['enable']);
- $config['interfaces']['opt' . ($i+1)]['descr'] = "OPT" . ($i+1);
+ if (empty($config['interfaces']['opt' . ($i+1)]['descr'])) {
+ $config['interfaces']['opt' . ($i+1)]['descr'] = "OPT" . ($i+1);
+ unset($config['interfaces']['opt' . ($i+1)]['enable']);
+ }
}
/* remove all other (old) optional interfaces */
@@ -414,7 +416,7 @@ EODD;
unset($config['interfaces']['opt' . ($i+1)]);
printf(gettext("%sWriting configuration..."), "\n");
- write_config();
+ write_config("Console assignment of interfaces");
printf(gettext("done.%s"), "\n");
fclose($fp);
OpenPOWER on IntegriCloud