r107 - mdadm/trunk/debian/initramfs

madduck at users.alioth.debian.org madduck at users.alioth.debian.org
Sun Aug 13 22:43:41 UTC 2006


Author: madduck
Date: 2006-08-13 22:43:40 +0000 (Sun, 13 Aug 2006)
New Revision: 107

Modified:
   mdadm/trunk/debian/initramfs/hook
Log:
initial homehost implementation

Modified: mdadm/trunk/debian/initramfs/hook
===================================================================
--- mdadm/trunk/debian/initramfs/hook	2006-08-12 15:35:59 UTC (rev 106)
+++ mdadm/trunk/debian/initramfs/hook	2006-08-13 22:43:40 UTC (rev 107)
@@ -79,7 +79,13 @@
 
 if [ -n "$DEVS" ]; then
 
-  echo "RAID_DEVS='${DEVS## }'" > $DESTDIR/conf/raid.conf
+  homehost=$(sed -ne 's,^[[:space:]]*HOMEHOST[[:space:]]*,,p' \
+    /etc/mdadm.conf /etc/mdadm/mdadm.conf 2>/dev/null || :)
+  if [ -z "$homehost" ] || [ "$homehost" = '<system>' ]; then
+    homehost="$(hostname)"
+  fi
+  echo "RAID_HOMEHOST='$homehost'" > DESTDIR/conf/raid.conf
+  echo "RAID_DEVS='${DEVS## }'" >> $DESTDIR/conf/raid.conf
   echo "RAID_LEVELS='${LEVELS## }'" >> $DESTDIR/conf/raid.conf
 
   # raid4 is handled by raid5




More information about the pkg-mdadm-commits mailing list