Support raid1 only for now, update changelog and TODO
[grml-debootstrap.git] / grml-debootstrap
index 31e7482..ed2f629 100755 (executable)
@@ -307,11 +307,15 @@ grubdevice() {
 config_swraid_setup()
 {
 TMPFILE=$(mktemp)
-RAIDLEVEL=$(dialog --stdout --title "$PN" --default-item raid1 \
-                   --menu "Which RAID level do you want to use?" 0 0 0 \
-                     raid1 "Software RAID level 1" \
-                     raid5 "Software RAID level 5")
-[ $? -eq 0 ] || bailout 20
+
+# Currently we support only raid1:
+RAIDLEVEL='raid1'
+
+#RAIDLEVEL=$(dialog --stdout --title "$PN" --default-item raid1 \
+#                   --menu "Which RAID level do you want to use?" 0 0 0 \
+#                     raid1 "Software RAID level 1" \
+#                     raid5 "Software RAID level 5")
+#[ $? -eq 0 ] || bailout 20
 
 MD_LIST=$(for i in $(seq 0 9) ; do
             awk '{print $4}' /proc/partitions | grep -q md$i || \
@@ -376,7 +380,7 @@ prompt_for_swraid()
 if dialog --stdout --title "$PN" \
           --defaultno --yesno "Do you want to configure Software RAID?
 
-Please notice that currently only RAID levels 1 and 5 are supported by ${PN}. Configuration will take place using mdadm." 0 0 ; then
+Please notice that only RAID level 1 is supported by ${PN} currently. Configuration will take place using mdadm." 0 0 ; then
   config_swraid_setup
 fi
 }
@@ -694,10 +698,10 @@ preparechroot() {
   # make sure we have our files for later use via chroot-script
   cp /etc/debootstrap/config    $MNTPOINT/etc/debootstrap/
   # make sure we adjust the configuration variables accordingly:
-  sed -i "s/RELEASE=.*/RELEASE=\"$RELEASE\"/" $MNTPOINT/etc/debootstrap/config
-  sed -i "s/TARGET=.*/TARGET=\"$TARGET\"/"    $MNTPOINT/etc/debootstrap/config
-  sed -i "s/GRUB=.*/GRUB=\"$GRUB\"/"          $MNTPOINT/etc/debootstrap/config
-  sed -i "s/GROOT=.*/GROOT=\"$GROOT\"/"       $MNTPOINT/etc/debootstrap/config
+  sed -i "s#RELEASE=.*#RELEASE=\"$RELEASE\"#" $MNTPOINT/etc/debootstrap/config
+  sed -i "s#TARGET=.*#TARGET=\"$TARGET\"#"    $MNTPOINT/etc/debootstrap/config
+  sed -i "s#GRUB=.*#GRUB=\"$GRUB\"#"          $MNTPOINT/etc/debootstrap/config
+  sed -i "s#GROOT=.*#GROOT=\"$GROOT\"#"       $MNTPOINT/etc/debootstrap/config
 
   cp /etc/debootstrap/packages  $MNTPOINT/etc/debootstrap/packages
 
@@ -712,7 +716,7 @@ preparechroot() {
   # provide system's /etc/hosts to the target:
   if ! [ -f "$MNTPOINT/etc/hosts" ] ; then
      cp /etc/hosts $MNTPOINT/etc/hosts
-     sed -i "s/127.0.0.1 .*/127.0.0.1       localhost  $HOSTNAME/" /etc/hosts
+     sed -i "s#127.0.0.1 .*#127.0.0.1       localhost  $HOSTNAME#" /etc/hosts
   fi
 
   # setup default locales