#!/usr/bin/perl -T

# deluser: a utility to delete users from 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
    #'uid=i'                             => \&W,
    #'gid=i'                             => \&W,
    "only_if_empty|only-if-empty!"       => \&W,
    "remove_home|remove-home!"           => \&W,
    "remove_all_files|remove-all-files!" => \&W,
    "backup!"                            => \&W,
    "backup_to|backup-to=s"              => \&W,
) ) {
  usage();
  exit 1;
}

postgetopt();

my $be = new Debian::Adduser::Backend;
$be->check;
$be->execute;
exit 0;

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

#  --uid UID                 - manually specify UID for new user
#  --gid GID                 - manually specify GID for new user

__DATA__
deluser [options] <name> [from-group-name]

Options:
  --remove_home|remove-home
  --only_if_empty|only-if-empty
  --remove_all_files|remove-all-files
  --backup
  --backup_to|backup-to
