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
1a7199cc
Commit
1a7199cc
authored
Jun 20, 2016
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code style rc.bootup
parent
5fa09cd4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
102 additions
and
107 deletions
+102
-107
rc.bootup
src/etc/rc.bootup
+102
-107
No files found.
src/etc/rc.bootup
View file @
1a7199cc
...
...
@@ -43,34 +43,26 @@ function is_install_media()
unlink
(
$file
);
return
false
;
}
return
true
;
}
function
is_interface_mismatch
()
{
global
$config
;
$do_assign
=
false
;
$i
=
0
;
if
(
isset
(
$config
[
'interfaces'
]))
{
foreach
(
legacy_config_get_interfaces
(
array
(
"virtual"
=>
false
))
as
$ifname
=>
$ifcfg
)
{
if
(
preg_match
(
"/^enc|^cua|^tun|^tap|^l2tp|^pptp|^ppp|^ovpn|^gif|^gre|^lagg|^bridge|vlan|_wlan/i"
,
$ifcfg
[
'if'
]))
{
/* Do not check these interfaces */
$i
++
;
continue
;
}
elseif
(
does_interface_exist
(
$ifcfg
[
'if'
])
==
false
)
{
$do_assign
=
true
;
}
else
{
$i
++
;
return
true
;
}
}
}
return
$do_assign
;
return
false
;
}
function
rescue_detect_keypress
()
{
$timer
=
7
;
...
...
@@ -83,8 +75,11 @@ function rescue_detect_keypress()
$key
=
null
;
while
(
!
isset
(
$key
)
||
!
in_array
(
$key
,
array
(
'c'
,
'C'
,
'r'
,
'R'
,
'i'
,
'I'
)))
{
if
(
$timer
>=
9
)
{
echo
chr
(
8
)
.
chr
(
8
)
.
(
$timer
==
9
?
chr
(
32
)
:
null
)
.
"
{
$timer
}
"
;
}
else
{
echo
chr
(
8
)
.
"
{
$timer
}
"
;
}
if
(
$timer
>=
9
)
{
echo
chr
(
8
)
.
chr
(
8
)
.
(
$timer
==
9
?
chr
(
32
)
:
null
)
.
"
{
$timer
}
"
;
}
else
{
echo
chr
(
8
)
.
"
{
$timer
}
"
;
}
shell_exec
(
'/bin/stty -icanon min 0 time 25'
);
$key
=
shell_exec
(
'/bin/dd count=1 status=none'
);
shell_exec
(
'/bin/stty icanon'
);
...
...
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