diff options
author | Ermal <eri@pfsense.org> | 2012-06-11 20:42:50 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2012-06-11 20:42:50 +0000 |
commit | 62784b050ad874bd8544531954b4b158036f9a23 (patch) | |
tree | 8334c18c7aca955cec0744f1fdf573d26b583e67 | |
parent | cb1d821b8ac1406da66ac8ad08338560bc192d1c (diff) | |
download | pfsense-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
-rw-r--r-- | etc/inc/config.console.inc | 8 |
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); |