ppcrcd/trunk/conf.dir/usr/lib/ppcrcd: assemble find_md hw-detect
sparky
cvs at pld-linux.org
Sun Mar 5 19:04:34 CET 2006
Author: sparky
Date: Sun Mar 5 19:04:25 2006
New Revision: 7098
Modified:
ppcrcd/trunk/conf.dir/usr/lib/ppcrcd/assemble
ppcrcd/trunk/conf.dir/usr/lib/ppcrcd/find_md
ppcrcd/trunk/conf.dir/usr/lib/ppcrcd/hw-detect
Log:
- md devices autodetection finally finished
Modified: ppcrcd/trunk/conf.dir/usr/lib/ppcrcd/assemble
==============================================================================
--- ppcrcd/trunk/conf.dir/usr/lib/ppcrcd/assemble (original)
+++ ppcrcd/trunk/conf.dir/usr/lib/ppcrcd/assemble Sun Mar 5 19:04:25 2006
@@ -4,5 +4,9 @@
if ps aux | grep mdadm | grep -q $DEV; then
exec /bin/true
else
- exec /sbin/mdadm --assemble --scan $DEV
+ if /sbin/mdadm --misc -D $DEV >/dev/null 2>&1; then
+ exec /bin/true
+ else
+ exec /sbin/mdadm --assemble --scan $DEV --auto=yes
+ fi
fi
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 Sun Mar 5 19:04:25 2006
@@ -49,6 +49,7 @@
my $cnt = 0;
mkdir "/mnt";
+mkdir "/dev/md";
open MD_OUT, ">> /etc/mdadm.conf";
open FS_OUT, ">> /etc/fstab";
open MO_OUT, "> /etc/modprobe.d/md.conf";
@@ -59,13 +60,15 @@
verbose(2, " Preparing /mnt/$dirname");
printf MD_OUT "DEVICE" . join " /dev/", ('', sort @{$by_uuid{$uuid}});
- printf MD_OUT "\nARRAY /dev/md$cnt uuid=$uuid\n";
+ printf MD_OUT "\nARRAY /dev/md/$cnt uuid=$uuid\n";
- printf FS_OUT "/dev/md$cnt /mnt/$dirname auto defaults 0 0\n";
+ printf FS_OUT "/dev/md$cnt /mnt/$dirname auto defaults,noauto,noatime 0 0\n";
mkdir "/mnt/$dirname";
- printf MO_OUT "install block-major-9-$cnt /usr/lib/ppcrcd/assemble /dev/md$cnt\n";
- system("mknod /dev/md$cnt b 9 $cnt");
+ printf MO_OUT "install block-major-111-$cnt { /usr/lib/ppcrcd/assemble /dev/md/$cnt; /bin/ln -sf md/$cnt /dev/md$cnt;"
+ . " mount /mnt/$dirname; }\n";
+ system("mknod /dev/md/$cnt b 9 $cnt");
+ system("mknod /dev/md$cnt b 111 $cnt");
$cnt++;
}
close MD_OUT;
Modified: ppcrcd/trunk/conf.dir/usr/lib/ppcrcd/hw-detect
==============================================================================
--- ppcrcd/trunk/conf.dir/usr/lib/ppcrcd/hw-detect (original)
+++ ppcrcd/trunk/conf.dir/usr/lib/ppcrcd/hw-detect Sun Mar 5 19:04:25 2006
@@ -38,7 +38,6 @@
-
echo -e "\n# autogenerated" >> /etc/fstab
# Searching for cdroms #######################################################
@@ -47,7 +46,8 @@
[ -n "$cddevs" ] && cddevs=$(lastlink $cddevs)
cddevs=" $cddevs "
-for cdrom in /dev/{dvdrw,dvd,cdwriter,cdrom} /dev/{dvdrw,dvd,cdwriter,cdrom}*; do
+for cdrom in /dev/{dvdrw,dvd,cdrw,cdwriter,cdrom} \
+ /dev/{dvdrw,dvd,cdrw,cdwriter,cdrom}*; do
verbose 5 " (Checking cdrom: $cdrom)"
[ -r $cdrom ] || continue
cddev=$(lastlink $cdrom)
More information about the pld-cvs-commit
mailing list