summaryrefslogtreecommitdiffstats
path: root/draklive
diff options
context:
space:
mode:
Diffstat (limited to 'draklive')
-rwxr-xr-xdraklive16
1 files changed, 8 insertions, 8 deletions
diff --git a/draklive b/draklive
index 13cfa51..6d2b675 100755
--- a/draklive
+++ b/draklive
@@ -51,12 +51,14 @@ $::verbose = 1;
sub clean {
my ($build) = @_;
- if (-e ($build->get_system_root)) {
- # Make sure there's nothing left mounted in the chroot.
- umount_all_in_chroot($build);
- system('sudo rm -rf ' . $build->get_system_root);
+ if (-e $build->get_builddir) {
+ umount_all_in_root($build->get_builddir);
+ system('sudo rm -rf ' . $build->get_builddir);
+ }
+ if (-e $build->get_chroot_dir) {
+ umount_all_in_root($build->get_chroot_dir);
+ system('sudo rm -rf ' . $build->get_chroot_dir);
}
- system('rm -rf ' . $build->get_builddir) if -e ($build->get_builddir);
}
sub prepare_root {
@@ -79,7 +81,7 @@ my @actions = (
{ name => 'dump-config', do => \&MGA::DrakISO::Config::dump_config },
{ name => 'clean', do => \&clean },
{ name => 'root', do => \&prepare_root },
- { name => 'root-create', do => \&MGA::DrakISO::BuildRoot::install_live_system },
+ { name => 'root-install', do => \&MGA::DrakISO::BuildRoot::install_live_system },
{ name => 'root-customise', do => \&MGA::DrakISO::BuildRoot::customise_live_system },
{ name => 'boot', do => \&prepare_boot },
{ name => 'boot-system', do => \&MGA::DrakISO::BuildBoot::prepare_live_system_boot },
@@ -89,8 +91,6 @@ my @actions = (
);
my @all = qw(root boot loop master);
-die "you must be root to run this program\n" if $>;
-
my $build_object = 'MGA::DrakISO::LiveBuild'->new;
my $config_root = '/etc/draklive';
my $config_path = 'config/build.cfg';