#!/usr/bin/perl -w

#------------------------------------------------------------------------
# Copyright (C) 2000 Michael Grubits.
#
# This file is part of DHCPStatus.
#
# DHCPStatus is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# DHCPStatus is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with DHCPStatus; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#------------------------------------------------------------------------

use strict;

use lib "/etc";
my $dhcpstatus_dir = $INC[0];

use dhcpstatus::dhcpstatus_cmd;
use dhcpstatus::dhcpstatus_subnet_cmd;
use dhcpstatus::Dhcpstatus_env;

my $dhcpstatus_env = Dhcpstatus_env->new($dhcpstatus_dir);
$dhcpstatus_env->get_screen_width;

if (@ARGV) {
   if ($ARGV[0] ne "-s" || $#ARGV != 1) {
      &usage;
      exit(1);
   }
   my $subnet_id = $ARGV[1];
   &dhcpstatus_subnet_cmd($dhcpstatus_env, $subnet_id);
}
else {
   &dhcpstatus_cmd($dhcpstatus_env);
}
