summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2010-03-08 16:53:45 +0000
committerErmal Luçi <eri@pfsense.org>2010-03-08 16:53:45 +0000
commita46e450ce9b791b839d0c05b90924240354b1c35 (patch)
treea3d8df496309eede86fd5525768fad733de6588f /etc
parent0c331f1e42cc19f2ba9a60499da474acd811cf44 (diff)
downloadpfsense-a46e450ce9b791b839d0c05b90924240354b1c35.zip
pfsense-a46e450ce9b791b839d0c05b90924240354b1c35.tar.gz
Do not spread checking for value accross code. Do it in the function that is supposed to do it.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/pfsense-utils.inc14
-rw-r--r--etc/phpshellsessions/gitsync6
-rwxr-xr-xetc/rc.bootup6
3 files changed, 10 insertions, 16 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 4af5559..a80cbe9 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -1004,7 +1004,12 @@ function reload_all_sync() {
mwexec("/bin/rm {$g['tmp_path']}/reload*");
}
-function auto_login($status) {
+function auto_login() {
+ global $config;
+
+ if(isset($config['system']['disableconsolemenu']))
+ return;
+
$gettytab = file_get_contents("/etc/gettytab");
$getty_split = split("\n", $gettytab);
conf_mount_rw();
@@ -1087,11 +1092,8 @@ function setup_serial_port() {
}
}
fclose($fd);
- if(isset($config['system']['disableconsolemenu'])) {
- auto_login(false);
- } else {
- auto_login(true);
- }
+ auto_login();
+
conf_mount_ro();
return;
}
diff --git a/etc/phpshellsessions/gitsync b/etc/phpshellsessions/gitsync
index bd662ca..6491851 100644
--- a/etc/phpshellsessions/gitsync
+++ b/etc/phpshellsessions/gitsync
@@ -227,11 +227,7 @@ function post_cvssync_commands() {
/* lock down console if necessary */
echo "===> Locking down the console if needed...\n";
- if(isset($config['system']['disableconsolemenu'])) {
- auto_login(false);
- } else {
- auto_login(true);
- }
+ auto_login();
echo "===> Signaling PHP and Lighty restart...";
$fd = fopen("/tmp/restart_lighty", "w");
diff --git a/etc/rc.bootup b/etc/rc.bootup
index b2db5fb..a6ca3f9 100755
--- a/etc/rc.bootup
+++ b/etc/rc.bootup
@@ -313,11 +313,7 @@ services_snmpd_configure();
system_set_harddisk_standby();
/* lock down console if necessary */
-if(isset($config['system']['disableconsolemenu'])) {
- auto_login(false);
-} else {
- auto_login(true);
-}
+auto_login();
/* Run a filter configure now that most all services have started */
filter_configure_sync();
OpenPOWER on IntegriCloud