Skip to content
GitLab
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-devel
Commits
30b68235
Commit
30b68235
authored
Dec 05, 2002
by
Leigh B. Stoller
Browse files
Minor mods for MFS at Mike's request. 1) Do not use SFS, and do not
use perl dbm code.
parent
b6d14520
Changes
2
Hide whitespace changes
Inline
Side-by-side
tmcd/common/libsetup.pm
View file @
30b68235
...
...
@@ -933,11 +933,16 @@ sub doaccounts()
}
CLOSETMCC
(
$TM
);
dbmopen
(
%PWDDB
,
TMPASSDB
,
0660
)
or
die
("
Cannot open
"
.
TMPASSDB
.
"
: $!
\n
");
if
(
!
MFS
())
{
#
# One the MFS, these will just start out as empty hashes.
#
dbmopen
(
%PWDDB
,
TMPASSDB
,
0660
)
or
die
("
Cannot open
"
.
TMPASSDB
.
"
: $!
\n
");
dbmopen
(
%GRPDB
,
TMGROUPDB
,
0660
)
or
die
("
Cannot open
"
.
TMGROUPDB
.
"
: $!
\n
");
dbmopen
(
%GRPDB
,
TMGROUPDB
,
0660
)
or
die
("
Cannot open
"
.
TMGROUPDB
.
"
: $!
\n
");
}
#
# Create any groups that do not currently exist. Add each to the
...
...
@@ -989,7 +994,9 @@ sub doaccounts()
%deletes
=
();
# Write the DB back out!
dbmclose
(
%GRPDB
);
if
(
!
MFS
())
{
dbmclose
(
%GRPDB
);
}
#
# Repeat the same sequence for accounts, except we remove old accounts
...
...
@@ -1151,7 +1158,9 @@ sub doaccounts()
}
}
# Write the DB back out!
dbmclose
(
%PWDDB
);
if
(
!
MFS
())
{
dbmclose
(
%PWDDB
);
}
#
# Create sfs_users file and populate it with public SFS keys
...
...
@@ -1686,12 +1695,18 @@ sub bootsetup()
#
create_nicknames
();
if
(
$USESFS
&&
!
MFS
())
{
#
# Setup SFS hostid.
#
print
STDOUT
"
Setting up for SFS ...
\n
";
dosfshostid
();
if
(
$USESFS
)
{
if
(
!
MFS
())
{
#
# Setup SFS hostid.
#
print
STDOUT
"
Setting up for SFS ...
\n
";
dosfshostid
();
}
else
{
# No SFS on the MFS.
$USESFS
=
0
;
}
}
#
...
...
@@ -1789,12 +1804,18 @@ sub nodeupdate()
return
0
;
}
if
(
$USESFS
&&
!
MFS
())
{
#
# Setup SFS hostid.
#
print
STDOUT
"
Setting up for SFS ...
\n
";
dosfshostid
();
if
(
$USESFS
)
{
if
(
!
MFS
())
{
#
# Setup SFS hostid.
#
print
STDOUT
"
Setting up for SFS ...
\n
";
dosfshostid
();
}
else
{
# No SFS on the MFS.
$USESFS
=
0
;
}
}
#
...
...
tmcd/libsetup.pm
View file @
30b68235
...
...
@@ -933,11 +933,16 @@ sub doaccounts()
}
CLOSETMCC
(
$TM
);
dbmopen
(
%PWDDB
,
TMPASSDB
,
0660
)
or
die
("
Cannot open
"
.
TMPASSDB
.
"
: $!
\n
");
if
(
!
MFS
())
{
#
# One the MFS, these will just start out as empty hashes.
#
dbmopen
(
%PWDDB
,
TMPASSDB
,
0660
)
or
die
("
Cannot open
"
.
TMPASSDB
.
"
: $!
\n
");
dbmopen
(
%GRPDB
,
TMGROUPDB
,
0660
)
or
die
("
Cannot open
"
.
TMGROUPDB
.
"
: $!
\n
");
dbmopen
(
%GRPDB
,
TMGROUPDB
,
0660
)
or
die
("
Cannot open
"
.
TMGROUPDB
.
"
: $!
\n
");
}
#
# Create any groups that do not currently exist. Add each to the
...
...
@@ -989,7 +994,9 @@ sub doaccounts()
%deletes
=
();
# Write the DB back out!
dbmclose
(
%GRPDB
);
if
(
!
MFS
())
{
dbmclose
(
%GRPDB
);
}
#
# Repeat the same sequence for accounts, except we remove old accounts
...
...
@@ -1151,7 +1158,9 @@ sub doaccounts()
}
}
# Write the DB back out!
dbmclose
(
%PWDDB
);
if
(
!
MFS
())
{
dbmclose
(
%PWDDB
);
}
#
# Create sfs_users file and populate it with public SFS keys
...
...
@@ -1686,12 +1695,18 @@ sub bootsetup()
#
create_nicknames
();
if
(
$USESFS
&&
!
MFS
())
{
#
# Setup SFS hostid.
#
print
STDOUT
"
Setting up for SFS ...
\n
";
dosfshostid
();
if
(
$USESFS
)
{
if
(
!
MFS
())
{
#
# Setup SFS hostid.
#
print
STDOUT
"
Setting up for SFS ...
\n
";
dosfshostid
();
}
else
{
# No SFS on the MFS.
$USESFS
=
0
;
}
}
#
...
...
@@ -1789,12 +1804,18 @@ sub nodeupdate()
return
0
;
}
if
(
$USESFS
&&
!
MFS
())
{
#
# Setup SFS hostid.
#
print
STDOUT
"
Setting up for SFS ...
\n
";
dosfshostid
();
if
(
$USESFS
)
{
if
(
!
MFS
())
{
#
# Setup SFS hostid.
#
print
STDOUT
"
Setting up for SFS ...
\n
";
dosfshostid
();
}
else
{
# No SFS on the MFS.
$USESFS
=
0
;
}
}
#
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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