Commit 85276ba6 authored by Mike Hibler's avatar Mike Hibler

Eliminate some more undefined var refs.

parent 8786e7e2
#!/usr/bin/perl -wT #!/usr/bin/perl -wT
# #
# Copyright (c) 2000-2002, 2004 University of Utah and the Flux Group. # Copyright (c) 2000-2014 University of Utah and the Flux Group.
# #
# {{{EMULAB-LICENSE # {{{EMULAB-LICENSE
# #
...@@ -165,6 +165,12 @@ foreach my $tipname ( keys %tipgroup ) { ...@@ -165,6 +165,12 @@ foreach my $tipname ( keys %tipgroup ) {
# set its mode too. # set its mode too.
# #
$gid = getgrnam($grp); $gid = getgrnam($grp);
if (!defined($gid)) {
print STDERR "*** Group '$grp' does not exist, ".
"console for $tipname will not be available\n";
$grp = "wheel";
$gid = 0;
}
chown(0, $gid, $filename) or chown(0, $gid, $filename) or
die("Could not chown(0, $gid) $filename: $!"); die("Could not chown(0, $gid) $filename: $!");
chmod(0640, $filename) or chmod(0640, $filename) or
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment