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
1fa570b3
Commit
1fa570b3
authored
Apr 05, 2015
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inc: remove safe_mkdir() because simplicity
parent
cf3977b7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
20 deletions
+5
-20
openvpn.inc
src/etc/inc/openvpn.inc
+4
-6
system.inc
src/etc/inc/system.inc
+1
-1
util.inc
src/etc/inc/util.inc
+0
-13
No files found.
src/etc/inc/openvpn.inc
View file @
1fa570b3
...
@@ -1285,12 +1285,10 @@ function openvpn_refresh_crls() {
...
@@ -1285,12 +1285,10 @@ function openvpn_refresh_crls() {
}
}
}
}
function
openvpn_create_dirs
()
{
function
openvpn_create_dirs
()
global
$g
;
{
if
(
!
is_dir
(
"
{
$g
[
'varetc_path'
]
}
/openvpn"
))
@
mkdir
(
'/var/etc/openvpn-csc'
,
0750
);
safe_mkdir
(
"
{
$g
[
'varetc_path'
]
}
/openvpn"
,
0750
);
@
mkdir
(
'/var/etc/openvpn'
,
0750
);
if
(
!
is_dir
(
"
{
$g
[
'varetc_path'
]
}
/openvpn-csc"
))
safe_mkdir
(
"
{
$g
[
'varetc_path'
]
}
/openvpn-csc"
,
0750
);
}
}
function
openvpn_get_interface_ip
(
$ip
,
$mask
)
{
function
openvpn_get_interface_ip
(
$ip
,
$mask
)
{
...
...
src/etc/inc/system.inc
View file @
1fa570b3
...
@@ -1333,7 +1333,7 @@ function system_ntp_configure($start_ntpd = true)
...
@@ -1333,7 +1333,7 @@ function system_ntp_configure($start_ntpd = true)
$statsdir
=
'/var/log/ntp'
;
$statsdir
=
'/var/log/ntp'
;
$gps_device
=
'/dev/gps0'
;
$gps_device
=
'/dev/gps0'
;
safe_mkdir
(
$statsdir
);
@
mkdir
(
$statsdir
,
0755
);
if
(
!
is_array
(
$config
[
'ntpd'
]))
{
if
(
!
is_array
(
$config
[
'ntpd'
]))
{
$config
[
'ntpd'
]
=
array
();
$config
[
'ntpd'
]
=
array
();
...
...
src/etc/inc/util.inc
View file @
1fa570b3
...
@@ -1279,19 +1279,6 @@ function return_dir_as_array($dir, $filter_regex = '') {
...
@@ -1279,19 +1279,6 @@ function return_dir_as_array($dir, $filter_regex = '') {
return
$dir_array
;
return
$dir_array
;
}
}
/*
* safe_mkdir($path, $mode = 0755)
* create directory if it doesn't already exist and isn't a file!
*/
function
safe_mkdir
(
$path
,
$mode
=
0755
)
{
if
(
!
is_file
(
$path
)
&&
!
is_dir
(
$path
))
{
return
@
mkdir
(
$path
,
$mode
,
true
);
}
else
{
return
false
;
}
}
/*
/*
* get_sysctl($names)
* get_sysctl($names)
* Get values of sysctl OID's listed in $names (accepts an array or a single
* Get values of sysctl OID's listed in $names (accepts an array or a single
...
...
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