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
deb6f79d
Commit
deb6f79d
authored
Aug 21, 2015
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
src: wrong project, gettext() mishap and general style
Spotted by: @fabianfrz
parent
c1165499
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
18 deletions
+18
-18
services.inc
src/etc/inc/services.inc
+15
-15
ACL_Legacy_Page_Map.json
...nse/mvc/app/models/OPNsense/Core/ACL_Legacy_Page_Map.json
+3
-3
No files found.
src/etc/inc/services.inc
View file @
deb6f79d
...
...
@@ -2295,27 +2295,30 @@ EOD;
return
0
;
}
/* configure cron service */
function
configure_cron
()
{
global
$g
,
$config
;
function
configure_cron
()
{
global
$config
;
$anchor
=
'# custom crontab entries'
;
/* preserve existing crontab entries */
$crontab_contents
=
file
(
"/etc/crontab"
,
FILE_IGNORE_NEW_LINES
|
FILE_SKIP_EMPTY_LINES
);
$crontab_contents
=
file
(
'/etc/crontab'
,
FILE_IGNORE_NEW_LINES
|
FILE_SKIP_EMPTY_LINES
);
for
(
$i
=
0
;
$i
<
count
(
$crontab_contents
);
$i
++
)
{
$cron_item
=
&
$crontab_contents
[
$i
];
if
(
strpos
(
$cron_item
,
"# pfSense specific crontab entries"
)
!==
false
)
{
$cron_item
=
&
$crontab_contents
[
$i
];
if
(
strpos
(
$cron_item
,
$anchor
)
!==
false
)
{
array_splice
(
$crontab_contents
,
$i
-
1
);
break
;
}
}
$crontab_contents
=
implode
(
"
\n
"
,
$crontab_contents
)
.
"
\n
"
;
/* please maintain the newline at the end of file */
$crontab_contents
=
implode
(
"
\n
"
,
$crontab_contents
)
.
"
\n
"
;
if
(
is
_array
(
$config
[
'cron'
][
'item'
]))
{
if
(
is
set
(
$config
[
'cron'
][
'item'
]))
{
$crontab_contents
.=
"#
\n
"
;
$crontab_contents
.=
"# "
.
gettext
(
"pfSense specific crontab entries"
)
.
"
\n
"
;
$crontab_contents
.=
"# "
.
gettext
(
"Created:"
)
.
" "
.
date
(
"F j, Y, g:i a"
)
.
"
\n
"
;
$crontab_contents
.=
$anchor
.
"
\n
"
;
$crontab_contents
.=
'# auto-generated at '
.
date
(
'F j, Y, g:i a'
)
.
"
\n
"
;
$crontab_contents
.=
"#
\n
"
;
foreach
(
$config
[
'cron'
][
'item'
]
as
$item
)
{
...
...
@@ -2329,18 +2332,15 @@ function configure_cron() {
}
$crontab_contents
.=
"
\n
#
\n
"
;
$crontab_contents
.=
"#
"
.
gettext
(
"If possible do not add items to this file manually."
)
.
"
\n
"
;
$crontab_contents
.=
"#
"
.
gettext
(
"If you do so, this file must be terminated with a blank line (e.g. new line)"
)
.
"
\n
"
;
$crontab_contents
.=
"#
If possible do not add items to this file manually.
\n
"
;
$crontab_contents
.=
"#
If you do so, this file must be terminated with a blank line (e.g. new line)
\n
"
;
$crontab_contents
.=
"#
\n\n
"
;
}
/* please maintain the newline at the end of file */
file_put_contents
(
'/etc/crontab'
,
$crontab_contents
);
unset
(
$crontab_contents
);
/* do a HUP kill to force sync changes */
killbypid
(
'/var/run/cron.pid'
,
'HUP'
);
}
function
upnp_action
(
$action
)
{
...
...
src/opnsense/mvc/app/models/OPNsense/Core/ACL_Legacy_Page_Map.json
View file @
deb6f79d
...
...
@@ -54,7 +54,7 @@
},
"page-diagnostics-crash-reporter"
:
{
"name"
:
"WebCfg - Crash reporter"
,
"descr"
:
"Uploads crash reports to
pfSense and or deletes crash report
s."
,
"descr"
:
"Uploads crash reports to
the developer
s."
,
"match"
:
[
"crash_reporter.php*"
]
...
...
@@ -641,8 +641,8 @@
]
},
"page-pfsensewizardsubsystem"
:
{
"name"
:
"WebCfg -
pfSense w
izard subsystem page"
,
"descr"
:
"Allow access to the '
pfSense w
izard subsystem' page."
,
"name"
:
"WebCfg -
W
izard subsystem page"
,
"descr"
:
"Allow access to the '
W
izard subsystem' page."
,
"match"
:
[
"wizard.php*"
]
...
...
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