#!/usr/bin/perl -T

# addgroup: a utility to add groups to the system

# Copyright (C) 2006-2008 Davor Ocelic <docelic@spinlocksolutions.com>
#                         SPINLOCK, http://www.spinlocksolutions.com/

use warnings;
use strict;
use lib '.'; # XXX

use Getopt::Long;

use Debian::Adduser::Init   qw/:gettext/;
use Debian::Adduser::Common qw/:reporting/;
use Debian::Adduser::Config qw/:cfg :getopt/;
use Debian::Adduser::Backend;

pregetopt();

unless ( GetOptions (
    %Debian::Adduser::Config::getopt, # Global options
    'force-badname'     => \&W,
    'system'            => \&W,
    #'disabled-password' => sub {
    #    W 'ask_passwd', 0
    #    },
    'first_gid|first-gid|firstgid=i' => \&W,
    'last_gid|last-gid|lastgid=i'    => \&W,
    'gid=i'                => \&W,
) ) {
  usage();
  exit 1;
}

postgetopt();

my $be = new Debian::Adduser::Backend;

$be->check;

$be->execute;

$be->finish;

exit 0;

# Local Variables:
# mode:cperl
# cperl-indent-level:4
# End:
# vim:set ai et sts=4 sw=4 tw=0:

__DATA__
addgroup [options] <name>

Options:
  --system                  - create system group
  --gid GID                 - manually specify GID for new group
  --first-gid GID           - first GID in autoselection range
  --last-gid GID            - last GID in autoselection range
  --force-badname           - allow weird characters in input
