summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2005-03-08 13:18:21 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2005-03-08 13:18:21 +0000
commitcb9eddf62ade56b3bc546b87d72ffc4c57b7618d (patch)
treedb7cb579fc489d5df11b7a17d5885d9433638195 /perl-install
parent77e8f709f6b7f2c11d5f1d3cca6951792b961021 (diff)
downloaddrakx-cb9eddf62ade56b3bc546b87d72ffc4c57b7618d.tar
drakx-cb9eddf62ade56b3bc546b87d72ffc4c57b7618d.tar.gz
drakx-cb9eddf62ade56b3bc546b87d72ffc4c57b7618d.tar.bz2
drakx-cb9eddf62ade56b3bc546b87d72ffc4c57b7618d.tar.xz
drakx-cb9eddf62ade56b3bc546b87d72ffc4c57b7618d.zip
log program exiting
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/interactive.pm9
-rw-r--r--perl-install/standalone.pm15
-rw-r--r--perl-install/ugtk2.pm7
3 files changed, 28 insertions, 3 deletions
diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm
index b7130fe5b..982f7fe65 100644
--- a/perl-install/interactive.pm
+++ b/perl-install/interactive.pm
@@ -122,7 +122,14 @@ sub leave_console {}
sub suspend {}
sub resume {}
sub end {}
-sub exit { exit($_[0]) }
+sub exit {
+ if ($::isStandalone) {
+ require standalone;
+ standalone::exit($_[0]);
+ } else {
+ exit($_[0])
+ }
+}
#-######################################################################################
#- Interactive functions
diff --git a/perl-install/standalone.pm b/perl-install/standalone.pm
index ad8b1e52f..97f4e0fe1 100644
--- a/perl-install/standalone.pm
+++ b/perl-install/standalone.pm
@@ -119,6 +119,19 @@ Network & Internet connection and monitoring application
$usages{$_} = $usages{rpmdrake} foreach qw(rpmdrake-remove MandrakeUpdate);
$usages{Xdrakres} = $usages{XFdrake};
+
+sub exit {
+ explanations('### Program is exiting ###');
+ CORE::exit(@_);
+}
+
+sub __exit {
+ explanations('### Program is exiting ###');
+ c::_exit(@_);
+}
+
+
+
sub version() {
print 'Drakxtools version 10
Copyright (C) 1999-2004 Mandrakesoft by <install@mandrakesoft.com>
@@ -165,7 +178,7 @@ my $standalone_name;
sub explanations { log::explanations("@_") }
our @common_functs = qw(renamef linkf symlinkf output substInFile mkdir_p rm_rf cp_af touch setVarsInSh setExportedVarsInSh setExportedVarsInCsh update_gnomekderc);
-our @builtin_functs = qw(chmod chown unlink link symlink rename system);
+our @builtin_functs = qw(chmod chown __exit exit unlink link symlink rename system);
our @drakx_modules = qw(Xconfig::card Xconfig::default Xconfig::main Xconfig::monitor Xconfig::parse Xconfig::proprietary Xconfig::resolution_and_depth Xconfig::screen Xconfig::test Xconfig::various Xconfig::xfree any bootloader bootlook c class_discard commands crypto detect_devices devices diskdrake diskdrake::hd_gtk diskdrake::interactive diskdrake::removable diskdrake::removable_gtk diskdrake::smbnfs_gtk fs fsedit http keyboard lang log loopback lvm modules::parameters modules mouse my_gtk network network::adsl network::ethernet network::isdn_consts network::isdn network::modem network::netconnect network::network network::nfs network::smb network::tools partition_table partition_table_bsd partition_table::dos partition_table::empty partition_table::gpt partition_table::mac partition_table::raw partition_table::sun printer printerdrake proxy raid run_program scanner services steps swap timezone network::drakfirewall network::shorewall);
$SIG{SEGV} = sub { my $progname = $0; $progname =~ s|.*/||; exec("drakbug --incident $progname") };
diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm
index 57f54acf8..8096f2b75 100644
--- a/perl-install/ugtk2.pm
+++ b/perl-install/ugtk2.pm
@@ -883,7 +883,12 @@ sub shrink_topwindow {
sub exit {
gtkset_mousecursor_normal(); #- for restoring a normal in any case
flush();
- c::_exit($_[1]); #- workaround
+ if ($::isStandalone) {
+ require standalone;
+ standalone::__exit($_[1]); #- workaround
+ } else {
+ c::_exit($_[1]); #- workaround
+ }
}
#- in case "exit" above was not called by the program