Once machines are ready for production use remove the commission
blessing and add the production ones, e.g.
- $ ./mg-hosts setflags mudcake{0,1} -- \!blessed-commission blessed-{real,play,adhoc}
+ $ ./mg-hosts setflags mudcake{0,1} -- ^blessed-commission blessed-{real,play,adhoc}
Shutting down the whole system
# ./mg-hosts showflags
# Print a table showing the flags of all hosts.
#
-# ./mg-hosts setflags HOSTGLOB... -|-- !FLAG|-FLAG|FLAG...
-# Updates some flags of the specified hosts. !FLAG and
-# -FLAG both clear the flag; FLAG sets it.
+# ./mg-hosts setflags HOSTGLOB... -|-- ^FLAG|FLAG...
+# Updates some flags of the specified hosts. ^FLAG
+# (or -FLAG or !FLAG) clears the flag; FLAG sets it.
#
# ./mg-hosts setflagexpr HOSTGLOB... - FLAG EXPR [-|-- FLAG EXPR...]
# Sets or clears some flags of the specified hosts,
# decreasing order of precedence):
# FLAG true iff FLAG is set for the host
# (EXPR) override precedence
-# !EXPR boolean negation } alternative
-# ~EXPR boolean negation } equivalent syntax
+# ^EXPR boolean negation } alternative
+# ~EXPR boolean negation } equivalent
+# !EXPR boolean negation } syntax
# EXPR&EXPR boolean "and"
# EXPR|EXPR boolean inclusive-or
# Spaces and tabs are disregarded (outside FLAG names).
die unless @$section;
foreach my $flagorig (@$section) {
my $flag = $flagorig;
- # each flag may start with - or ! to remove
- my $remove= $flag =~ s/^[-!]//;
+ # each flag may start with ^ (or - or !) to remove
+ my $remove= $flag =~ s/^[-!^]//;
setflagval($dst,$flag,!$remove);
}
});
my ($dst,$section) = @_;
die unless @$section == 2;
my ($dstflag, $expr) = @$section;
- die "$expr $& ?" if $expr =~ m/[^-0-9a-z_&|()!~ \t]/;
+ die "$expr $& ?" if $expr =~ m/[^-0-9a-z_&|()!~ \t^]/;
my %inputs;
$expr =~ s{[-0-9a-z_]+}{
$inputs{$&} = undef;
" \$inputs{'$&'} ";
}ge;
- $expr =~ s/\~/!/g;
+ $expr =~ s/[~^]/!/g;
$expr =~ s/[&|]/$&$&/g;
foreach my $flagorig (sort keys %inputs) {