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
7fd322f1
Commit
7fd322f1
authored
Mar 05, 2015
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rc: tmp_path removal
parent
0fa44def
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
14 deletions
+16
-14
rc.bootup
src/etc/rc.bootup
+3
-2
rc.prunecaptiveportal
src/etc/rc.prunecaptiveportal
+13
-12
No files found.
src/etc/rc.bootup
View file @
7fd322f1
...
...
@@ -158,8 +158,9 @@ echo "done.\n";
while
(
is_interface_mismatch
()
==
true
)
{
led_assigninterfaces
();
if
(
isset
(
$config
[
'revision'
]))
{
if
(
file_exists
(
"
{
$g
[
'tmp_path'
]
}
/missing_interfaces"
))
echo
"Warning: Configuration references interfaces that do not exist: "
.
file_get_contents
(
"
{
$g
[
'tmp_path'
]
}
/missing_interfaces"
)
.
"
\n
"
;
if
(
file_exists
(
'/tmp/missing_interfaces'
))
{
echo
"Warning: Configuration references interfaces that do not exist: "
.
file_get_contents
(
'/tmp/missing_interfaces'
)
.
"
\n
"
;
}
echo
"
\n
Network interface mismatch -- Running interface assignment option.
\n
"
;
}
else
echo
"
\n
Default interfaces not found -- Running interface assignment option.
\n
"
;
...
...
src/etc/rc.prunecaptiveportal
View file @
7fd322f1
...
...
@@ -2,8 +2,6 @@
<?php
/*
part of m0n0wall (http://m0n0.ch/wall)
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
All rights reserved.
...
...
@@ -29,8 +27,6 @@
POSSIBILITY OF SUCH DAMAGE.
*/
/* parse the configuration and include all functions used below */
/* config.inc retrives the util.inc and globals.inc */
require_once
(
"config.inc"
);
require_once
(
"functions.inc"
);
require_once
(
"filter.inc"
);
...
...
@@ -42,21 +38,26 @@ global $cpzone;
global
$cpzoneid
;
$cpzone
=
str_replace
(
"
\n
"
,
""
,
$argv
[
1
]);
if
(
!
is_array
(
$config
[
'captiveportal'
][
$cpzone
]))
{
log_error
(
"
{
$cpzone
}
is not a valid zone in the configuration!"
);
return
;
}
$cpzoneid
=
$config
[
'captiveportal'
][
$cpzone
][
'zoneid'
];
if
(
file_exists
(
"
{
$g
[
'tmp_path'
]
}
/.rc.prunecaptiveportal.running"
))
{
$stat
=
stat
(
"
{
$g
[
'tmp_path'
]
}
/.rc.prunecaptiveportal.running"
);
if
(
time
()
-
$stat
[
'mtime'
]
>=
120
)
@
unlink
(
"
{
$g
[
'tmp_path'
]
}
/.rc.prunecaptiveportal.running"
);
else
{
if
(
file_exists
(
'/tmp/.rc.prunecaptiveportal.running'
))
{
$stat
=
stat
(
'/tmp/.rc.prunecaptiveportal.running'
);
if
(
time
()
-
$stat
[
'mtime'
]
>=
120
)
{
@
unlink
(
'/tmp/.rc.prunecaptiveportal.running'
);
}
else
{
log_error
(
"Skipping CP prunning process because previous/another instance is already running"
);
return
;
}
}
@
file_put_contents
(
"
{
$g
[
'tmp_path'
]
}
/.rc.prunecaptiveportal.running"
,
""
);
@
file_put_contents
(
'/tmp/.rc.prunecaptiveportal.running'
,
''
);
captiveportal_prune_old
();
@
unlink
(
"
{
$g
[
'tmp_path'
]
}
/.rc.prunecaptiveportal.running"
);
?>
@
unlink
(
'/tmp/.rc.prunecaptiveportal.running'
);
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