summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-10-13 22:32:07 +0000
committerThierry Vignaud <tv@mandriva.org>2008-10-13 22:32:07 +0000
commitd8e5cca02a16734d4308a275353a1a11d3412041 (patch)
treed19bc46af41267f4dbb08949ef946e1fbad8159b
parent5e768d143d19126b9809aca284049290f818cbec (diff)
downloadmgaonline-d8e5cca02a16734d4308a275353a1a11d3412041.tar
mgaonline-d8e5cca02a16734d4308a275353a1a11d3412041.tar.gz
mgaonline-d8e5cca02a16734d4308a275353a1a11d3412041.tar.bz2
mgaonline-d8e5cca02a16734d4308a275353a1a11d3412041.tar.xz
mgaonline-d8e5cca02a16734d4308a275353a1a11d3412041.zip
(fork_exec,get_banner) move them into share module (needed for next commits)
-rwxr-xr-xmdkapplet14
-rw-r--r--mdkonline.pm16
2 files changed, 16 insertions, 14 deletions
diff --git a/mdkapplet b/mdkapplet
index fa450701..9cc8c7fe 100755
--- a/mdkapplet
+++ b/mdkapplet
@@ -360,12 +360,6 @@ sub harvester {
return @pids;
}
-sub fork_exec {
- my $pid = run_program::raw({ detach => 1 }, @_);
- return $pid;
-}
-
-
sub configNetwork() { logIt(N_("Launching drakconnect\n")); fork_exec("/usr/sbin/drakconnect") }
sub restart_applet() {
@@ -397,14 +391,6 @@ sub upgrade_distro_congratulations() {
$w->main;
}
-sub get_banner() {
- Gtk2::Banner->new(
- (find { -e $_ }
- qw(/usr/share/mcc/themes/default/rpmdrake-mdk.png /usr/share/icons/large/mdkonline.png)),
- N("Distribution Upgrade")
- );
-}
-
sub confirm_upgrade() {
local $mygtk2::left_padding = 0;
my $width = 500;
diff --git a/mdkonline.pm b/mdkonline.pm
index 1053f034..dcae7795 100644
--- a/mdkonline.pm
+++ b/mdkonline.pm
@@ -28,6 +28,9 @@ use strict;
use lib qw(/usr/lib/libDrakX);
use common;
+our @ISA = qw(Exporter);
+our @EXPORT = qw(fork_exec get_banner);
+
use log;
my $release_file = find { -f $_ } '/etc/mandriva-release', '/etc/mandrakelinux-release', '/etc/mandrake-release', '/etc/redhat-release';
@@ -56,6 +59,19 @@ sub clean_confdir() {
system "/bin/rm", "-f", "$confdir/*log.bz2", "$confdir/*log.bz2.uue", "$confdir/*.dif $confdir/rpm_qa_installed_before", "$confdir/rpm_qa_installed_after";
}
+
+sub fork_exec {
+ run_program::raw({ detach => 1 }, @_);
+}
+
+sub get_banner() {
+ Gtk2::Banner->new(
+ (find { -e $_ }
+ qw(/usr/share/mcc/themes/default/rpmdrake-mdk.png /usr/share/icons/large/mdkonline.png)),
+ N("Distribution Upgrade")
+ );
+}
+
sub is_running {
my ($name) = @_;
my $found;