ppcrcd/trunk/conf.dir/usr/lib/ppcrcd: find_md rc.live
sparky
cvs at pld-linux.org
Sat Mar 4 21:18:30 CET 2006
Author: sparky
Date: Sat Mar 4 21:18:26 2006
New Revision: 7090
Modified:
ppcrcd/trunk/conf.dir/usr/lib/ppcrcd/find_md
ppcrcd/trunk/conf.dir/usr/lib/ppcrcd/rc.live
Log:
- few fixes, but it isn't working like i'd like
Modified: ppcrcd/trunk/conf.dir/usr/lib/ppcrcd/find_md
==============================================================================
--- ppcrcd/trunk/conf.dir/usr/lib/ppcrcd/find_md (original)
+++ ppcrcd/trunk/conf.dir/usr/lib/ppcrcd/find_md Sat Mar 4 21:18:26 2006
@@ -10,7 +10,7 @@
sub verbose {
my $verb = shift;
- return if $verbose > $verb;
+ return if $verbose < $verb;
my $msg = shift;
warn "$prog: $msg\n";
@@ -25,7 +25,7 @@
next unless $f =~ /^[sh]d[a-z][0-9]*$/;
my @out = `mdadm -E /dev/$f 2>&1`;
if ( $? != 0 ) {
- print "$f\n" if $f =~ /^[sh]d[a-z][0-9]+$/;
+ print "/dev/$f\n" if $f =~ /^[sh]d[a-z][0-9]+$/;
next;
}
@@ -33,7 +33,7 @@
chomp $uuid;
$uuid =~ s/\s*UUID\s*:\s*//;
unless ( length $uuid ) {
- print "$f\n" if $f =~ /^[sh]d[a-z][0-9]+$/;
+ print "/dev/$f\n" if $f =~ /^[sh]d[a-z][0-9]+$/;
next;
}
verbose(4, " +-Found /dev/$f ($uuid)");
@@ -58,13 +58,13 @@
my $dirname = "md${cnt}_" . join '', sort @{$by_uuid{$uuid}};
verbose(2, " Preparing /mnt/$dirname");
- printf MD_OUT "DEVICE " . join " /dev/", ('', @{$by_uuid{$uuid}});
+ printf MD_OUT "DEVICE" . join " /dev/", ('', sort @{$by_uuid{$uuid}});
printf MD_OUT "\nARRAY /dev/md$cnt uuid=$uuid\n";
printf FS_OUT "/dev/md$cnt /mnt/$dirname auto defaults 0 0\n";
mkdir "/mnt/$dirname";
- printf MO_OUT "install block-major-9-$cnt /usr/lib/ppcrcd/assemble /dev/md$cnt";
+ printf MO_OUT "install block-major-9-$cnt /usr/lib/ppcrcd/assemble /dev/md$cnt\n";
system("mknod /dev/md$cnt b 9 $cnt");
$cnt++;
}
Modified: ppcrcd/trunk/conf.dir/usr/lib/ppcrcd/rc.live
==============================================================================
--- ppcrcd/trunk/conf.dir/usr/lib/ppcrcd/rc.live (original)
+++ ppcrcd/trunk/conf.dir/usr/lib/ppcrcd/rc.live Sat Mar 4 21:18:26 2006
@@ -43,7 +43,7 @@
cmdopt verbose && echo 1 > /verbose
verb=$(cmdvar verbose)
-[ -n "$verb" ] && echo $verb > /verbose
+[ -n "$verb" ] && echo $verb > /verbose || echo 0 > /verbose
### load-conf ################################################################
More information about the pld-cvs-commit
mailing list