Commit 76283768 authored by Franco Fichtner's avatar Franco Fichtner

rc: chain local_sync_accounts() into system_login_configure()

parent 98ffa9fe
......@@ -337,15 +337,10 @@ function userHasPrivilege($userent, $privid = false)
return true;
}
function local_sync_accounts($verbose = false)
function local_sync_accounts()
{
global $config;
if ($verbose) {
echo 'Synchronizing user settings...';
flush();
}
/* remove local users to avoid uid conflicts */
$fd = popen('/usr/sbin/pw usershow -a', 'r');
if ($fd) {
......@@ -395,10 +390,6 @@ function local_sync_accounts($verbose = false)
local_group_set($group);
}
}
if ($verbose) {
echo "done.\n";
}
}
function local_user_set(&$user, $force_unlock = false)
......
......@@ -1702,6 +1702,9 @@ function system_login_configure($verbose = false)
flush();
}
/* depends on user account locking */
local_sync_accounts();
configd_run('template reload OPNsense/Auth');
$serialspeed = (!empty($config['system']['serialspeed']) && is_numeric($config['system']['serialspeed'])) ? $config['system']['serialspeed'] : '115200';
......
......@@ -122,7 +122,6 @@ system_resolvconf_generate(true);
filter_configure_sync(true);
filter_pflog_start(true);
setup_gateways_monitor(true);
local_sync_accounts(true);
system_webgui_configure(true);
system_cron_configure(true);
system_routing_configure('', true);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment