197 |
+ foreach my $s (@srcparts) {($srcpart) = $s =~ /devices=(\Q$source_drive\E\d+)/}; |
+ foreach my $s (@srcparts) {($srcpart) = $s =~ /devices=(\Q$source_drive\E\d+)/}; |
198 |
+ $tgtpart = $srcpart =~ s/\Q$source_drive/$target_drive/r; |
+ $tgtpart = $srcpart =~ s/\Q$source_drive/$target_drive/r; |
199 |
+ |
+ |
200 |
+ print "Adding $tgtpart to $devices[$part]"; |
+ print "Adding $tgtpart to $devices[$part]\n"; |
201 |
+ system("/sbin/mdadm", $devices[$part], "--add", $tgtpart) == 0 |
+ system("/sbin/mdadm", $devices[$part], "--add", $tgtpart) == 0 |
202 |
+ or die "Error adding $tgtpart to $devices[$part]"; |
+ or die "Error adding $tgtpart to $devices[$part]"; |
203 |
} |
} |
204 |
-close(OUTPUT) or die "Closing stdin pipe reported: $!\n"; |
-close(OUTPUT) or die "Closing stdin pipe reported: $!\n"; |
205 |
|
|
206 |
+# Finished |
+# Finished |
207 |
+print "Successfully added $target_drive to RAID!"; |
+print "Successfully added $target_drive to RAID!\n"; |
208 |
\ No newline at end of file |
\ No newline at end of file |
209 |
diff -urN e-smith-base-5.8.0.old/root/sbin/e-smith/console-menu-items/manageRAID.pl e-smith-base-5.8.0/root/sbin/e-smith/console-menu-items/manageRAID.pl |
diff -urN e-smith-base-5.8.0.old/root/sbin/e-smith/console-menu-items/manageRAID.pl e-smith-base-5.8.0/root/sbin/e-smith/console-menu-items/manageRAID.pl |
210 |
--- e-smith-base-5.8.0.old/root/sbin/e-smith/console-menu-items/manageRAID.pl 2020-12-23 17:42:19.991247057 +0000 |
--- e-smith-base-5.8.0.old/root/sbin/e-smith/console-menu-items/manageRAID.pl 2020-12-23 17:42:19.991247057 +0000 |