Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
881a01ce
Commit
881a01ce
authored
Dec 13, 2014
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inc: auto_login() isn't needed, but we need to invoke stuff on boot
parent
31b7aa52
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
55 deletions
+9
-55
pfsense-utils.inc
src/etc/inc/pfsense-utils.inc
+0
-53
system.inc
src/etc/inc/system.inc
+6
-2
rc.bootup
src/etc/rc.bootup
+3
-0
No files found.
src/etc/inc/pfsense-utils.inc
View file @
881a01ce
...
@@ -998,63 +998,10 @@ function setup_serial_port($when="save", $path="") {
...
@@ -998,63 +998,10 @@ function setup_serial_port($when="save", $path="") {
}
}
unset
(
$on_off
,
$console_type
,
$serial_type
);
unset
(
$on_off
,
$console_type
,
$serial_type
);
fclose
(
$fd
);
fclose
(
$fd
);
auto_login
();
reload_ttys
();
reload_ttys
();
conf_mount_ro
();
conf_mount_ro
();
}
}
function
auto_login
()
{
global
$config
;
/*
* This function appends the autologin extension in /etc/gettytab
* for the main console. This only works with a vanilla config;
* it is likely that manual editing by the user will make this
* function stop working properly. In case of no match, throw a
* little error...
*/
$getty_file
=
"/etc/gettytab"
;
$getty_text
=
explode
(
"
\n
"
,
file_get_contents
(
$getty_file
));
$getty_al
=
isset
(
$config
[
'system'
][
'disableconsolemenu'
])
?
""
:
"al=root:"
;
$getty_base
=
"
\t
:ht:np:sp#9600:"
;
$getty_new
=
$getty_base
.
$getty_al
;
$getty_ok
=
false
;
foreach
(
$getty_text
as
$getty_old
)
{
if
(
!
strncmp
(
$getty_old
,
$getty_base
,
strlen
(
$getty_base
)))
{
if
(
!
strcmp
(
$getty_old
,
$getty_new
))
{
/* already the correct setting */
return
;
}
$getty_ok
=
true
;
}
}
if
(
!
$getty_ok
)
{
log_error
(
gettext
(
"Could not toggle auto login setting."
));
return
;
}
$fd
=
fopen
(
$getty_file
,
"w"
);
if
(
!
$fd
)
{
log_error
(
gettext
(
"Could not write auto login setting."
));
return
;
}
foreach
(
$getty_text
as
$getty_old
)
{
if
(
!
strncmp
(
$getty_old
,
$getty_base
,
strlen
(
$getty_base
)))
{
fprintf
(
$fd
,
"%s
\n
"
,
$getty_new
);
}
else
{
fprintf
(
$fd
,
"%s
\n
"
,
$getty_old
);
}
}
fclose
(
$fd
);
}
function
is_serial_enabled
()
function
is_serial_enabled
()
{
{
global
$g
,
$config
;
global
$g
,
$config
;
...
...
src/etc/inc/system.inc
View file @
881a01ce
<?php
<?php
/* $Id$ */
/*
/*
system.inc
part of m0n0wall (http://m0n0.ch/wall)
part of m0n0wall (http://m0n0.ch/wall)
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
...
@@ -1681,6 +1680,11 @@ function system_reboot_cleanup() {
...
@@ -1681,6 +1680,11 @@ function system_reboot_cleanup() {
stop_packages
();
stop_packages
();
}
}
function
system_console_configure
()
{
setup_serial_port
();
}
function
system_dmesg_save
()
function
system_dmesg_save
()
{
{
global
$g
;
global
$g
;
...
...
src/etc/rc.bootup
View file @
881a01ce
...
@@ -295,6 +295,9 @@ echo "done.\n";
...
@@ -295,6 +295,9 @@ echo "done.\n";
/* start load balancer daemon */
/* start load balancer daemon */
relayd_configure
();
relayd_configure
();
/* configure console menu */
system_console_configure
();
/* start DHCP service */
/* start DHCP service */
services_dhcpd_configure
();
services_dhcpd_configure
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment