Commit 060d51e8 authored by Leigh Stoller's avatar Leigh Stoller

Make it an error to put a free node into node_admin mode; makes no

sense to do this since bootinfo will ignore it on free nodes.
parent 00b47611
#!/usr/bin/perl -wT #!/usr/bin/perl -wT
# #
# EMULAB-COPYRIGHT # EMULAB-COPYRIGHT
# Copyright (c) 2000-2007 University of Utah and the Flux Group. # Copyright (c) 2000-2009 University of Utah and the Flux Group.
# All rights reserved. # All rights reserved.
# #
use strict; use strict;
...@@ -144,7 +144,10 @@ else { ...@@ -144,7 +144,10 @@ else {
die("*** $0:\n". die("*** $0:\n".
" Node $n does not exist!\n"); " Node $n does not exist!\n");
} }
if (!$node->IsReserved()) {
die("*** $0:\n".
" Node $n is not reserved; reserve it first!\n");
}
if ($UID && !$this_user->IsAdmin() && if ($UID && !$this_user->IsAdmin() &&
! $node->AccessCheck($this_user, TB_NODEACCESS_LOADIMAGE)) { ! $node->AccessCheck($this_user, TB_NODEACCESS_LOADIMAGE)) {
die("*** $0:\n". die("*** $0:\n".
......
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