Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-stable
Commits
58ce4cc9
Commit
58ce4cc9
authored
Mar 28, 2003
by
Leigh B. Stoller
Browse files
Make a complete dir hierarchy under the group directory so it looks
just like /proj/$pid.
parent
9c3191b7
Changes
1
Hide whitespace changes
Inline
Side-by-side
tbsetup/mkgroup.in
View file @
58ce4cc9
...
...
@@ -36,6 +36,7 @@ my $PROJROOT = "/proj";
my
$GRPROOT
=
"
/groups
";
my
$SSH
=
"
$TB
/bin/sshtb
";
my
$GROUPADD
=
"
/usr/sbin/pw groupadd
";
my
@DIRLIST
=
("
exp
",
"
images
",
"
logs
",
"
tarfiles
",
"
rpms
",
"
tiplogs
");
my
$dbuid
;
my
@db_row
;
...
...
@@ -240,8 +241,25 @@ if ($pid ne $gid) {
symlink
(
$groupdir
,
$grouplink
)
or
fatal
("
Could not symlink(
$groupdir
,
$grouplink
): $!
");
}
}
#
# Make group subdirs.
#
foreach
my
$dir
(
@DIRLIST
)
{
if
(
!
-
e
"
$groupdir
/
$dir
")
{
if
(
!
mkdir
("
$groupdir
/
$dir
",
0770
))
{
fatal
("
Could not make directory
$groupdir
/
$dir
: $!
");
}
if
(
!
chmod
(
0770
,
"
$groupdir
/
$dir
"))
{
fatal
("
Could not chmod directory
$groupdir
/
$dir
: $!
");
}
if
(
!
chown
(
$unix_uid
,
$unix_gid
,
"
$groupdir
/
$dir
"))
{
fatal
("
Could not chown
$groupdir
/
$dir
: $!
");
}
}
}
}
print
"
Group Creation Completed!
\n
";
exit
(
0
);
...
...
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