Browse Source

Better clean-up.

master
freesource 24 years ago
parent
commit
d885b953ee
  1. 17
      gBootRoot

17
gBootRoot

@ -543,7 +543,9 @@ $box2->show();
my $cbutton = Gtk::Button->new("Close"); my $cbutton = Gtk::Button->new("Close");
$cbutton->signal_connect("clicked", $cbutton->signal_connect("clicked",
sub { sub {
unlink "$verbosefn", "$tmp/initrd_image.gz"; unlink "$verbosefn", "$tmp/initrd_image",
"$tmp/initrd_image.gz";
system "umount $tmp/initrd_mnt";
rmdir "$tmp/initrd_mnt"; rmdir "$tmp/initrd_mnt";
rmdir "$tmp"; rmdir "$tmp";
rmdir "$mnt"; rmdir "$mnt";
@ -571,15 +573,20 @@ exit( 0 );
# This works on GNU/Linux # This works on GNU/Linux
sub signal { sub signal {
unlink "$verbosefn", "$tmp/initrd_image.gz";
system "umount $tmp/initrd_mnt";
rmdir "$tmp/initrd_mnt";
rmdir "$tmp";
rmdir "$mnt";
$SIG{INT} = \&signal; $SIG{INT} = \&signal;
$SIG{ABRT} = \&signal; $SIG{ABRT} = \&signal;
$SIG{TERM} = \&signal; $SIG{TERM} = \&signal;
$SIG{QUIT} = \&signal; $SIG{QUIT} = \&signal;
$SIG{KILL} = \&signal; $SIG{KILL} = \&signal;
unlink "$verbosefn", "$tmp/initrd_image.gz";
rmdir "$tmp/initrd_mnt";
rmdir "$tmp";
rmdir "$mnt";
Gtk->exit(0); Gtk->exit(0);
} }

Loading…
Cancel
Save