#!/usr/local/bin/perl -w

use blib;

use strict;
use AFS::BOS;

my ($server, $cellname, $bos);

die "Usage: $0 server [cell]\n" if $#ARGV < 0;

$server   = shift;
$cellname = shift;

if ($cellname) { $bos = AFS::BOS->new($server, 0, 0, $cellname); }
else           { $bos = AFS::BOS->new($server); }
print "Error Code: $AFS::CODE\n" if ($AFS::CODE);

die "not yet tested ... \n";

print "bos->setrestart()...\n";

my ($general, $newbinary) = (1, 0); # set only one of them
my $time = 'sat 4:00';

my $ok = $bos->setrestart($time, $general, $newbinary);
print "Error Code: $AFS::CODE\n" if ($AFS::CODE);
print "Something went wrong\n" unless $ok;



($general, $newbinary) = (0, 1); # set only one of them
$time = '5:00';

$ok = $bos->setrestart($time, $general, $newbinary);
print "Error Code: $AFS::CODE\n" if ($AFS::CODE);
print "Something went wrong\n" unless $ok;

$bos->DESTROY;
