Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
provision
Commits
48008579
Commit
48008579
authored
Mar 18, 2008
by
Adrian Rossouw
Committed by
adrian
Mar 18, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed some issues relating to creation of paths. the commands worked, but the validation was wrong.
parent
4f0894ca
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
+10
-7
provision.inc
provision.inc
+8
-5
provision.module
provision.module
+2
-2
No files found.
provision.inc
View file @
48008579
...
...
@@ -492,17 +492,20 @@ function provision_check_path($path, $type, $test = true, $succeed_message = '',
break
;
case
"is_dir"
:
$value
=
is_dir
(
$path
);
break
;
case
"owner"
:
$value
=
fileowner
(
$path
);
case
"owner"
:
$info
=
posix_getpwuid
(
fileowner
(
$path
));
$value
=
$info
[
'name'
];
break
;
case
"group"
:
$value
=
filegroup
(
$path
);
break
;
case
"mkdir"
:
$value
=
mkdir
(
$path
,
0770
,
true
);
break
;
case
"chmod"
:
chmod
(
$path
,
$test
);
$value
=
sprintf
(
"%o"
,
fileperms
(
$path
));
case
"chmod"
:
chmod
(
$path
,
$test
);
$test
=
(
int
)
sprintf
(
'%o'
,
$test
);
# needs to be reset to oct
$value
=
(
int
)
substr
(
sprintf
(
'%o'
,
fileperms
(
$path
)),
-
4
);
break
;
case
"chown"
:
chown
(
$path
,
$test
);
$value
=
fileowner
(
$path
);
$info
=
posix_getpwuid
(
fileowner
(
$path
));
$value
=
$info
[
'name'
];
break
;
case
"chgrp"
:
chgrp
(
$path
,
$test
);
$value
=
filegroup
(
$path
);
...
...
@@ -527,4 +530,4 @@ function provision_check_path($path, $type, $test = true, $succeed_message = '',
}
}
return
$status
;
}
\ No newline at end of file
}
provision.module
View file @
48008579
...
...
@@ -576,8 +576,8 @@ function _provision_verify($url = '') {
t
(
"Could not change ownership <code>%path</code>"
,
array
(
"%path"
=>
$path
)),
PROVISION_PERM_ERROR
|
PROVISION_FRAMEWORK_ERROR
);
provision_check_path
(
$path
,
"chmod"
,
0700
,
t
(
"Changed permissions of <code>%path</code> to %perms"
,
array
(
"%path"
=>
$path
,
'%perms'
=>
0700
)),
t
(
"Could not change ownership <code>%path</code> to %perms"
,
array
(
"%path"
=>
$path
,
'%perms'
=>
0700
)),
t
(
"Changed permissions of <code>%path</code> to %perms"
,
array
(
"%path"
=>
$path
,
'%perms'
=>
sprintf
(
'%o'
,
0700
))
)
,
t
(
"Could not change ownership <code>%path</code> to %perms"
,
array
(
"%path"
=>
$path
,
'%perms'
=>
sprintf
(
'%o'
,
0700
))
)
,
PROVISION_PERM_ERROR
|
PROVISION_FRAMEWORK_ERROR
);
$data
=
array
();
...
...
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