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
bf8356c9
Commit
bf8356c9
authored
Jul 28, 2015
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rc.initial: apply PSR2 style
parent
0fe885b9
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
558 additions
and
507 deletions
+558
-507
rc.initial.banner
src/etc/rc.initial.banner
+72
-70
rc.initial.defaults
src/etc/rc.initial.defaults
+1
-1
rc.initial.halt
src/etc/rc.initial.halt
+1
-1
rc.initial.password
src/etc/rc.initial.password
+37
-36
rc.initial.ping
src/etc/rc.initial.ping
+6
-6
rc.initial.reboot
src/etc/rc.initial.reboot
+1
-1
rc.initial.setlanip
src/etc/rc.initial.setlanip
+440
-392
No files found.
src/etc/rc.initial.banner
View file @
bf8356c9
...
...
@@ -48,13 +48,13 @@ if (empty($iflist)) {
return
;
}
foreach
(
$iflist
as
$ifname
=>
$friendly
)
{
foreach
(
$iflist
as
$ifname
=>
$friendly
)
{
/* point to this interface's config */
$ifconf
=
$config
[
'interfaces'
][
$ifname
];
/* look for 'special cases' */
$class
=
""
;
if
(
isset
(
$ifconf
[
'ipaddr'
]))
{
switch
(
$ifconf
[
'ipaddr'
])
{
switch
(
$ifconf
[
'ipaddr'
])
{
case
"dhcp"
:
$class
=
"/DHCP4"
;
break
;
...
...
@@ -71,7 +71,7 @@ foreach($iflist as $ifname => $friendly) {
}
$class6
=
null
;
if
(
isset
(
$ifconf
[
'ipaddrv6'
]))
{
switch
(
$ifconf
[
'ipaddrv6'
])
{
switch
(
$ifconf
[
'ipaddrv6'
])
{
case
"dhcp6"
:
$class6
=
"/DHCP6"
;
break
;
...
...
@@ -100,7 +100,8 @@ foreach($iflist as $ifname => $friendly) {
$v6first
=
false
;
if
(
!
empty
(
$ipaddr
)
&&
!
empty
(
$subnet
))
{
printf
(
"v4%s: %s/%s"
,
printf
(
"v4%s: %s/%s"
,
$class
,
$ipaddr
,
$subnet
...
...
@@ -112,7 +113,8 @@ foreach($iflist as $ifname => $friendly) {
if
(
!
$v6first
)
{
printf
(
"
\n
%s"
,
str_repeat
(
" "
,
20
));
}
printf
(
"v6%s: %s/%s"
,
printf
(
"v6%s: %s/%s"
,
$class6
,
$ipaddr6
,
$subnet6
...
...
src/etc/rc.initial.defaults
View file @
bf8356c9
src/etc/rc.initial.halt
View file @
bf8356c9
src/etc/rc.initial.password
View file @
bf8356c9
...
...
@@ -56,8 +56,9 @@ if (strcasecmp(chop(fgets($fp)), 'y') == 0) {
echo
"Failed to locate the admin user account! Attempting to restore access.
\n
"
;
$admin_user
=
array
();
$admin_user
[
'uid'
]
=
0
;
if
(
!
isset
(
$config
[
'system'
][
'user'
]))
if
(
!
isset
(
$config
[
'system'
][
'user'
]))
{
$config
[
'system'
][
'user'
]
=
array
();
}
$config
[
'system'
][
'user'
][]
=
$admin_user
;
}
...
...
src/etc/rc.initial.ping
View file @
bf8356c9
src/etc/rc.initial.reboot
View file @
bf8356c9
src/etc/rc.initial.setlanip
View file @
bf8356c9
This diff is collapsed.
Click to expand it.
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