]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
installer: Destroy RAID superblocks on single disk installations
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 21 Aug 2014 14:43:45 +0000 (16:43 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 21 Aug 2014 14:43:45 +0000 (16:43 +0200)
src/installer/hw.c
src/installer/hw.h
src/installer/main.c

index 667e07fdf7584e4e1e76db477b01b6e6e46ded22..212deef89ef1b678be8c957e1fa2b2230253497d 100644 (file)
@@ -822,7 +822,7 @@ int hw_umount_filesystems(struct hw_destination* dest, const char* prefix) {
        return 0;
 }
 
-static int hw_destroy_raid_superblocks(const struct hw_destination* dest, const char* output) {
+int hw_destroy_raid_superblocks(const struct hw_destination* dest, const char* output) {
        char cmd[STRING_SIZE];
 
        hw_stop_all_raid_arrays(output);
index ea98e2f09e6d9156340dd92b73e1972777755c65..123d89f7ca813d32daf7e3214a7d5c9e0f86f24c 100644 (file)
@@ -120,6 +120,7 @@ int hw_create_filesystems(struct hw_destination* dest, const char* output);
 int hw_mount_filesystems(struct hw_destination* dest, const char* prefix);
 int hw_umount_filesystems(struct hw_destination* dest, const char* prefix);
 
+int hw_destroy_raid_superblocks(const struct hw_destination* dest, const char* output);
 int hw_setup_raid(struct hw_destination* dest, const char* output);
 int hw_stop_all_raid_arrays(const char* output);
 
index 254aae8ea5fa9700a82c2767e4005cd6922c2c3e..45420e13e4dfca505c7a9fa7089c780cbc1687ce 100644 (file)
@@ -540,6 +540,10 @@ int main(int argc, char *argv[]) {
                }
 
                newtPopWindow();
+       } else {
+               // We will have to destroy all RAID setups that may have
+               // been on the devices that we want to use now.
+               hw_destroy_raid_superblocks(destination, logfile);
        }
 
        // Execute the partitioning...