Commit 8bf87804 authored by Leigh B Stoller's avatar Leigh B Stoller

Merge branch 'mymaster'

parents a2b05718 3df31cd5
......@@ -17,12 +17,13 @@ sub Install($$$)
Phase "crontab", "Editing $CRONTAB", sub {
DoneIfEdited($CRONTAB);
AppendToFileFatal($CRONTAB,
"0 \t6\t*\t*\t*\troot\t$PREFIX/sbin/audit",
"12 \t*\t*\t*\t*\troot\t$PREFIX/sbin/dumperrorlog",
"0 \t1\t*\t*\t*\troot\t$PREFIX/sbin/dbcheck",
"45 \t1\t*\t*\t*\troot\t$PREFIX/sbin/backup",
"*/5\t*\t*\t*\t*\troot\t$PREFIX/sbin/node_status",
"*/5\t*\t*\t*\t*\troot\t$PREFIX/sbin/idlemail");
"0 \t6\t*\t*\t*\troot\t$PREFIX/sbin/audit",
"12 \t*\t*\t*\t*\troot\t$PREFIX/sbin/dumperrorlog",
"0 \t1\t*\t*\t*\troot\t$PREFIX/sbin/dbcheck",
"45 \t1\t*\t*\t*\troot\t$PREFIX/sbin/backup",
"*/5\t*\t*\t*\t*\troot\t$PREFIX/sbin/node_status",
"*/5\t*\t*\t*\t*\troot\t$PREFIX/sbin/prereserve_check",
"*/5\t*\t*\t*\t*\troot\t$PREFIX/sbin/idlemail");
};
};
return 0;
......
#
# Add prereserve_check to /etc/crontab
#
use strict;
use libinstall;
use installvars;
sub InstallUpdate($$)
{
my ($version, $phase) = @_;
#
# If something should run in the pre-install phase.
#
if ($phase eq "pre") {
;
}
#
# If something should run in the post-install phase.
#
if ($phase eq "post") {
Phase "crontab", "Updating $CRONTAB", sub {
DoneIfEdited($CRONTAB);
BackUpFileFatal($CRONTAB);
AppendToFileFatal($CRONTAB,
"*/5\t*\t*\t*\t*\troot\t$TBROOT/sbin/prereserve_check");
};
}
return 0;
}
1;
# Local Variables:
# mode:perl
# End:
#!/usr/bin/perl -wT
#
# Copyright (c) 2000-2011 University of Utah and the Flux Group.
# Copyright (c) 2000-2012 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -349,13 +349,15 @@ foreach my $token (@userlist) {
}
#
# Add special admin group. Check to make sure that its not a dup
# since the above mechanism could cause a duplicate entry. No big
# deal to catch it.
# Add special admin group. Also add wheel and mysql cause once
# you become an admin and have a local shell, might as well just
# do this too. Watch for dups though, since the above mechanism
# could cause a duplicate entry. No big deal to catch it.
#
if (TBAdmin($uid)) {
if (! grep(/^${ADMINGRP}$/, @extragrouplist)) {
push(@extragrouplist, $ADMINGRP);
if ($user->admin()) {
foreach my $extragroup ($ADMINGRP, "wheel", "mysql") {
push(@extragrouplist, $extragroup)
if (! grep(/^${extragroup}$/, @extragrouplist));
}
}
......
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