#!/usr/bin/perl

use lib qw(/usr/lib/libDrakX);

use common qw(:common :functional :file);
use interactive;
use standalone;
use services;
use log;

$::isEmbedded = ($::XID, $::CCPID) = "@ARGV" =~ /--embedded (\w+) (\w+)/;

local $_ = join '', @ARGV;

/-h/ and die "usage: drakxservices\n";


my $in = vnew interactive('su');
begin:
my $l = services::ask($in);
services::doit($in, $l) if $l;
!$::isEmbedded and $in->exit(0);
kill USR1, $::CCPID;
goto begin;