From d2aa1ae17071ea6289bead36e7a27613e535545c Mon Sep 17 00:00:00 2001 From: carlosg Date: Tue, 16 May 2006 15:03:57 +0000 Subject: 2006-05-15 Carlos Garnacho Parro * Merged the waiting-the-dbus branch into HEAD * configure.in, Makefile.am, autogen.sh: bump to 1.9.0, do not use translations (no longer needed) and fix references to the new .pc file * GroupsConfig.pm, HostsConfig.pm, IfacesConfig.pm, NFSConfig.pm, NTPConfig.pm, SMBConfig.pm, ServicesConfig.pm, ServicesList.pm, SharesList.pm, SystemToolsBackends.pl.in, TimeConfig.pm, UsersConfig.pm, org.freedesktop.SystemToolsBackends.service.in, system-tools-backends-2.0.pc.in, test-backends, Init/Services.pm, Init/ServicesList.pm, Network/Hosts.pm, Network/Ifaces.pm, Shares/Exports.pm, Shares/NFS.pm, Shares/SMB.pm, Time/NTP.pm, Time/TimeDate.pm, Users/Groups.pm, Users/Shells.pm, Users/Users.pm, Utils/Backend.pm, Utils/File.pm, Utils/Monitor.pm, Utils/Parse.pm, Utils/Platform.pm, Utils/Replace.pm, Utils/Report.pm, Utils/Util.pm, Utils/XML.pm: Added/refactored files, replace the functionality in the older *.pl.in files * boot-conf.in, boot-grub.pl.in, boot-lilo.pl.in, boot-yaboot.pl.in, boot.pl.in, file.pl.in, general.pl.in, network-conf.in, network.pl.in, parse.pl.in, platform.pl.in, replace.pl.in, report.pl.in, service-list.pl.in, service.pl.in, services-conf.in, share.pl.in, shares-conf.in, system-tools-backends.pc.in, time-conf.in, users-conf.in, util.pl.in, xml.pl.in: Functional removed files, they've been replaced with the files above. * add_amp.sh, debug.pl.in, dhcpd-conf.in, dhcpd.pl.in, disks-conf.in, display-conf.in, filesys.pl.in, font-conf.in, font.pl.in, gen-reportcode-list.sh, guess_system.sh, hardware-conf.in, internetsharing-conf.in, ishare.pl.in, media.pl.in, memory-conf.in, mouse-conf.in, option.pl, package-conf.in, partition.pl.in, perldoc.pl, print-conf.in, print.pl.in, process.pl.in, removable-media.pl.in, rhprinterdb2gstxml.pl, test.pl, tokenizer.pl.in, type1inst, x.pl.in: Bunch of unused files (or used in unstable tools), if/when they prove their usefulness, they'll be added back, but for now they'd better be in the Attic. --- SystemToolsBackends.pl.in | 69 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100755 SystemToolsBackends.pl.in (limited to 'SystemToolsBackends.pl.in') diff --git a/SystemToolsBackends.pl.in b/SystemToolsBackends.pl.in new file mode 100755 index 0000000..5894933 --- /dev/null +++ b/SystemToolsBackends.pl.in @@ -0,0 +1,69 @@ +#!/usr/bin/env perl +#-*- Mode: perl; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + +# Loader for the system tools backends. +# +# Copyright (C) 2005 Carlos Garnacho +# +# Authors: Carlos Garnacho Parro +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Library General Public License as published +# by the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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 Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +BEGIN { + $SCRIPTSDIR = "@scriptsdir@"; + if ($SCRIPTSDIR !~ /^@scriptsdir[@]/) + { + push @INC, $SCRIPTSDIR; + } +} + +use Net::DBus; +use Net::DBus::Service; +use Net::DBus::Reactor; +use Utils::Backend; +use Utils::Monitor; +use Utils::Platform; + +use SMBConfig; +use NFSConfig; +use UsersConfig; +use GroupsConfig; +use TimeConfig; +use NTPConfig; +use HostsConfig; +use IfacesConfig; +use ServicesConfig; + +# Initialize tool +&Utils::Backend::init ($name, $version, $description, $directives, @ARGV); + +# Initialize bus +my $bus = &Utils::Backend::get_bus (); +my $service = $bus->export_service ($Utils::Backend::DBUS_PREFIX); + +#Initialize all objects +my $platforms_list = Utils::Platform->new ($service); +my $smb_config = SMBConfig->new ($service); +my $nfs_config = NFSConfig->new ($service); +my $users_config = UsersConfig->new ($service); +my $groups_config = GroupsConfig->new ($service); +my $time_config = TimeConfig->new ($service); +my $ntp_config = NTPConfig->new ($service); +my $hosts_config = HostsConfig->new ($service); +my $ifaces_config = IfacesConfig->new ($service); +my $services_config = ServicesConfig->new ($service); + +Net::DBus::Reactor->main->add_timeout (50, Net::DBus::Callback->new(method => \&Utils::Monitor::do_monitor_files)); +Net::DBus::Reactor->main->run (); -- cgit v1.2.3